# Copyright (c) 2017 by Michael Zahniser
# Copyright (c) 2018 by Zitchas
# Copyright (c) 2022 by williaji
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

mission "First Contact: Remnant"
	landing
	invisible
	source
		government "Remnant"
	on offer
		conversation
			`Although they are unusually tall and dark-skinned, the people here appear to be human. You wouldn't know it from the architecture, however: the buildings with their curved, twisted surfaces and ramifying arches look more alien than any human dwelling you have seen before.`
			`	Stranger still, no one is speaking: the usual background murmur of voices that you would associate with a spaceport is absent here. Instead, the locals are communicating in a rapid and graceful sign language, their hands tracing arcs through the air almost faster than your eyes can follow.`
			`	A few of them approach your ship and one of them greets you out loud, but instead of speaking he sings the words in a high, monotone chant: "Do you comprehend the ancestral tongue?"`
			choice
				`	(Say, "Yes, I do.")`
				`	(Try to chant, "Yes, I do.")`
					goto chant

			`	Their expressions are inscrutable; you aren't sure if they even understood you or not. They turn away from you for a second and converse in sign language.`
				goto blood
			label chant
			`	You sing, "Yes, I do," trying to match the leader's pitch. As you do so, several of them hum notes that harmonize with you.`
			label blood
			`	Two of them walk up to you. One is carrying a small device that looks like a handheld scanner. The other unwraps a small foil package, pulls out a lancet, and jabs his finger with it. A dark, red drop of blood wells up. He presses his finger onto a port on the scanner, then hands you another one of the packets. "We kindly request that you identify yourself," he chants. Several of the others hum along with him.`
			choice
				`	(Give them a blood sample.)`
					goto yes
				`	(Refuse to give them a sample.)`
					goto no
				`	(Run back to my ship and escape from here.)`

			`	You run into your airlock, slam the door shut, and blast off from the planet. Already, several of their ships are moving to intercept you. It seems that you are no longer welcome in this region of space...`
				launch

			label no
			`	You try to pull away, but the man's hand snakes out and grabs you by the wrist. Before you are even able to react he jabs your finger and shoves it onto the scanner. "You are in our space," he sings. "You will abide by our rules." No longer a monotone, his song is a jarring and atonal melody.`
			label yes
			`	Several of them gather around the one with the scanner as if waiting to see what the results will be. As you watch them you notice that all of them, even the women, have their hair cropped short. Also, their clothing looks like nothing that has ever been in fashion at any point in human history that you know of.`
			`	Finally the scanner beeps, and a yellow light flashes. You can almost feel the tension leaving the air as the crowd relaxes. "So you are pure. You are human," chants one of the women. "You are one of us."`
			choice
				`	"Of course I'm human. But what are human beings doing out here?"`
				`	"Who are you?"`

			`	Several of them burst into song, singing together in harmony, "We are the hidden ones. We are the Remnant. In time of great chaos to this place we came, lest all true-born humans be killed or enslaved, by those who evolved not, but unwisely were made."`
			`	As they continue to sing, you begin to piece together their story. They are the descendants of people who fled to this region of space through an unstable wormhole at the peak of the first Alpha War, which means they have been here for more than half a millennium. That doesn't explain why their culture is so radically different, though.`
			`	Eventually they invite you to a dinner. Their food has strange and complex flavors, not all of them pleasant, but you do your best to be polite and pretend to enjoy it all. The meal itself is generous and stretches out as your hosts consume considerably more food than you would expect for such a trim group. After the meal, they entertain you by singing songs, some of which you recognize as classical Earth music. It appears that people in this culture use sign language for day to day communication, and use their voices only for making music.`
			`	When you return to your ship, you do a search on videos of historical dialects of human sign language. None of them bear even a passing resemblance to the language of these people who call themselves the Remnant.`
				decline
			
	on enter
		"remnant chilia" ++
		conversation
			`As you break orbit and get ready to escape, you receive a message from <planet>. A chant comes from your speakers.`
			`	"My compatriots seem to have gotten off on the wrong foot. I am Prefect Chilia of the Remnant. We established ourselves here as a bastion of humanity to survive when the rest of human space was under threat by the Alphas.`
			`	"The blood test we requested is mandatory for all who come to our worlds. We will not tolerate the presence of anyone of Alpha heritage. Should you agree to the blood test and pass, we will allow you to visit our worlds in peace."`
			choice
				`	"Okay, I'll take the blood test."`
					goto accept
				`	"I'm not taking any blood test."`
			action
				set "remnant: declined second chance"
				"reputation: Remnant" <?= -10
			`	"Then leave immediately or be eliminated. You will not be welcomed here again."`
				decline
			
			label accept
			action
				set "remnant: accepted second chance"
			`	"Please return to <planet>. Be on your best behavior, as there will be no third chance."`
	
	to fail
		has "remnant: declined second chance"
	
	on fail
		log "Discovered a strange, isolated human community in an otherwise uninhabited region of space south of the Core. Angered them by refusing to submit to some sort of blood test."
		log "Factions" "Remnant" `The Remnant are a group of unusual-looking humans that live in a secluded section of the galaxy. It is unclear how long they have lived apart from the rest of humanity, but they have been free of human influences for long enough that their culture is wildly different from any found in human record. Their buildings seem to be alien in origin, and they communicate amongst each other primarily with sign language. When they do use their voices they sing or chant, rather than speak.`
	
	on decline
		event "ember waste label"
		log "Discovered a strange, isolated human community in an otherwise uninhabited region of space south of the Core. They call themselves the Remnant."
		log "Factions" "Remnant" `Half a millennium ago, during the Alpha Wars, a group of humans fleeing the conflict and looking for a safer place to live discovered a wormhole into a region of space known as the Ember Waste. They built settlements there, and chose to call themselves the Remnant. Although they no longer fear the Alphas as much as they once did, they still have not rejoined human society.`
			`Since their colonies were first formed, the Remnant's culture has changed drastically. They communicate in sign language, using their voices only for singing. Their food and architecture and much of their technology is strange, and much of it has been borrowed or stolen from nearby alien species.`
	
	npc
		government "Remnant"
		personality heroic coward disables plunders
		fleet "Large Remnant" 2
	
	to complete
		has "remnant: accepted second chance"
	
	on complete
		event "ember waste label"
		log "Discovered a strange, isolated human community in an otherwise uninhabited region of space south of the Core. They call themselves the Remnant."
		log "Factions" "Remnant" `Half a millennium ago, during the Alpha Wars, a group of humans fleeing the conflict and looking for a safer place to live discovered a wormhole into a region of space known as the Ember Waste. They built settlements there, and chose to call themselves the Remnant. Although they no longer fear the Alphas as much as they once did, they still have not rejoined human society.`
			`Since their colonies were first formed, the Remnant's culture has changed drastically. They communicate in sign language, using their voices only for singing. Their food and architecture and much of their technology is strange, and much of it has been borrowed or stolen from nearby alien species.`
		conversation
			`Your return trip is a bit more nerve-wracking. Unlike the previous time, your flight computer keeps blaring warnings that the ships escorting you are weapons-hot and locked on. As soon as you land, your ship is surrounded by soldiers with a variety of weapons, and the same man appears in the midst of them. As before, he pricks his finger, presses it to a spot on the device, then offers a still-sealed lancet to you. He begins chanting in a severe tone, "The first may be a misunderstanding, but now you know our law. Will you submit to a blood test, or be declared guilty once and for all?"`
			choice
				`	(Provide the blood sample.)`
					goto comply
				`	(Refuse and run for my ship.)`
				
			`	As you turn to start running back to your ship, the soldiers nearby begin raising their weapons and firing at you. As you feel your body begin to liquefy under the assault of the strange energy bolts, the last thing you see is the look of pity, resignation, and confusion on the face of the man with the scanner. Probably wondering why you would decide to return if you were just going to run again. You suppose they'll never know...`
				die
			
			label comply
			`	Several of them gather around the one with the scanner as if waiting to see what the results will be. As you watch them you notice that all of them, even the women, have their hair cropped short. Also, their clothing looks like nothing that has ever been in fashion at any point in human history that you know of.`
			`	Finally the scanner beeps, and a yellow light flashes. You can almost feel the tension leaving the air as the crowd relaxes. "So you are pure. You are human," chants one of the women. "You are one of us."`
			choice
				`	"Of course I'm human. But what are human beings doing out here?"`
				`	"Who are you?"`

			`	Several of them burst into song, singing together in harmony, "We are the hidden ones. We are the Remnant. In time of great chaos to this place we came, lest all true-born humans be killed or enslaved, by those who evolved not, but unwisely were made."`
			`	As they continue to sing, you begin to piece together their story. They are the descendants of people who fled to this region of space through an unstable wormhole at the peak of the first Alpha War, which means they have been here for more than half a millennium. That doesn't explain why their culture is so radically different, though.`
			`	Eventually they invite you to a dinner. Their food has strange and complex flavors, not all of them pleasant, but you do your best to be polite and pretend to enjoy it all. After the meal, they entertain you by singing songs, some of which you recognize as classical Earth music. It appears that people in this culture use sign language for day to day communication, and use their voices only for making music.`
			`	When you return to your ship, you do a search on videos of historical dialects of human sign language. None of them bear even a passing resemblance to the language of these people who call themselves the Remnant.`



# Compatibility patch for those who made contact with the Remnant prior to v0.9.15
# v2 has been added to force those on continuous who already have the patch to get it again so that they get the post-scanning hostility/tolerance hail changes
mission "Remnant: Blood Test Patch v2"
	landing
	invisible
	to offer
		has "event: ember waste label"
		not "Remnant: Scanning Tolerances: done"
	on offer
		set "remnant: blood test pure"
		event "remnant: change hail"
		fail



mission "Remnant: Lost in Ember Waste: Trigger"
	landing
	invisible
	source
		government "Remnant"
	to offer
		has "remnant: blood test pure"
		not "license: Remnant"
		not "outfit: Quantum Keystone"
		not "outfit: Quantum Key Stone"
		not "outfit: Jump Drive"
		not "outfit: Shield Beetle Pendant"
	on offer
		event "remnant: lost in ember waste" 14
		fail



mission "Remnant: Lost in Ember Waste"
	landing
	invisible
	source
		government "Remnant"
	to offer
		has "event: remnant: lost in ember waste"
		not "license: Remnant"
		not "outfit: Quantum Keystone"
		not "outfit: Quantum Key Stone"
		not "outfit: Jump Drive"
		not "outfit: Shield Beetle Pendant"
	on offer
		outfit "Quantum Key Stone" 1
		log `Became stuck in the Ember Waste, but was given a Quantum Key Stone by an old woman who claims to have once been stuck in Republic space under similar circumstances.`
		conversation
			`You wander the <origin> spaceport feeling very lost in this strange region of space. Having flown around for a few weeks with no idea of how to get out, you wonder if you'll be stuck here forever.`
			`	You sit down on a bench and think about how you're going to get out of this situation. While you think, an old woman approaches you and signs something.`
			choice
				`	"Sorry, I don't understand."`
			`	The old woman chuckles to herself. "You seem lost," she says. You nod. To your surprise, she doesn't sing everything she says like the other Remnant.`
			`	"I'm guessing you don't know about the wormholes."`
			choice
				`	"The what?"`
				`	"I do, I just can't get through them."`
					goto know
			
			`	"There are red wormholes scattered around this region of space. You can only access them if you have a Key Stone on your ship, though. Don't ask me how it works, but that's how it is."`
				goto keystone
			
			label know
			`	"Lost your Key Stone?" she asks with another chuckle. "Or maybe your jump drive, and now you're stuck here? No problem."`
			
			label keystone
			`	The woman reaches into a bag that she has with her and hands you a Quantum Key Stone. "Just put this on your ship and you can be on your way out of here."`
			choice
				`	"You're just giving this to me?"`
					goto thanks
				`	"What's the catch?"`
			`	She chuckles again. "No catch."`
			
			label thanks
			`	The woman sits down on the bench next to you. "I was once lost in Republic space for many years after losing my Key Stone. I know what it can be like to be away from your people for that long, so I'd rather not see you share the same fate."`
			choice
				`	"Thanks for the help. I'll go fit this on my ship."`
				`	"How'd you get to Republic space?"`
					goto republic
			
			`	You say goodbye to the woman and begin walking to your ship. "Safe travels, Captain," she sings with a big grin on her face as you walk away.`
				decline
			
			label republic
			`	"I was an adventurous spirit in my youth," she says. "One day I found my way out of the Ember Waste and back to what I learned was the rest of humanity. For years my people had hidden here believing the Alphas had killed everyone else, but I discovered that we had little to fear.`
			`	"I explored the Republic for many months, learning what had happened since the Alpha Wars, but when I attempted to return to the Ember Waste to tell my people, I found that my Key Stone had been stolen at some point during my journey. I had no way to return."`
			`	She lets out a long sigh. "I don't want to bore you with all the details, but I resigned myself to my new life. I met a man, had two daughters, but never lost hope of returning to my true home. One day, after my daughters had grown and my husband had passed in an accident, I decided to go on another adventure. I dusted off my old ship, and soon discovered the Hai."`
			branch hai
				has "First Contact: Hai: offered"
			choice
				`	"The who?"`
			`	"How you've become lost here without having discovered the Hai first is beyond me." She chuckles. "The Hai are a peaceful alien people north of humanity. Go looking for a purple wormhole in the uninhabited systems of the Far North. You may find your way there.`
				goto next
			
			label hai
			choice
				`	"You've met the Hai?"`
			`	"Well of course. How else would I have been able to return home?`
			
			label next
			`	"To my surprise, the Hai had a large number of Quantum Key Stones." She pauses for a moment. "Might be a good idea for you to bring some of those Hai keystones here. Anyway, I was so thrilled that I didn't even ask any questions about how they had them. I bought one and flew as fast as I could back to the Ember Waste, and I've been here ever since."`
			choice
				`	"How long ago was that?"`
				`	"What about your daughters?"`
					goto daughters
			
			`	"Well I got lost when I was 17 and returned when I was 64, so perhaps some 130 years ago now that I returned." She chuckles at the surprised look on your face as you realize that she is nearly 200 years old. "Uncovering ancient alien technology is quite the blessing.`
				goto end
			
			label daughters
			`	"Oh, I only told them about deciding to travel the galaxy. Never told them about returning home. I made trips to see them every so often, but they both passed many decades ago now. It seems like the Republic can't quite get anyone to live past 130 years.`
			
			label end
			`	"I really must get going, now," she says. The woman gets up to leave, but before walking away she turns to you and sings, "Safe travels, Captain," with a big grin on her face. You say goodbye to her in return and part ways.`
				decline



mission "Remnant: Defense 1"
	name "Defend <planet>"
	description "Assist in defending <planet> from a Korath raid, then return to the planet."
	source "Caelian"
	to offer
		has "remnant: blood test pure"
		not "remnant: defense delay"
	on offer
		conversation
			`In the relative quiet of this Remnant spaceport, it's unusually jarring when an alarm siren begins howling. All around you, people are rushing to get their ships into the air. Even though no one stops to explain to you what is happening, it's pretty clear that this is a planetary defense operation.`
			choice
				`	(Assist the defenders.)`
					launch
				`	(Stay here, and don't help them.)`
			`	You remain behind on the planet. You probably just missed out on a great opportunity to earn the gratitude of the Remnant.`
				defer
	on defer
		set "remnant: defense delay"
		event "remnant: defense timer" 20
	npc
		government "Remnant"
		personality staying uninterested disables plunders
		fleet "Large Remnant"
	npc evade
		government "Korath"
		personality staying heroic plunders harvests target
		fleet "Korath Ember Waste Raid" 6
	on visit
		dialog "There are still Korath raiders circling overhead. You should take off and help the Remnant ships to fight them."
	on complete
		payment 500000



mission "Remnant: Defense 2"
	landing
	name "Remnant bounty"
	description "A Korath ship is flying around Remnant territory. Hunt it down and destroy it, then return to <planet> for payment."
	source "Caelian"
	to offer
		has "Remnant: Defense 1: done"
	on offer
		conversation
			`The people here are grateful for your help in fighting off the Korath raid, and they offer you a payment of <payment>. They explain to you (in song, of course; the explanation takes the form of an epic ballad) that these raids have been taking place for nearly a century.`
			choice
				`	"Have you done anything to try to stop the Korath from raiding you?"`
				`	"What do you think the Korath are hoping to accomplish?"`
					goto motives
	
			`	"Of course not," chants one of them. "Why would we give up a good opportunity to plunder new technology?" His voice is such a perfect monotone that you can't tell whether the comment was meant facetiously or not.`
				goto next
	
			label motives
			`	"Perhaps they seek new territory, or perhaps they are just innately aggressive," chants one person.`
			`	"Of course," says another, "the fact that our ships dump their cargo when the raiders attack probably makes us a tempting target."`
			`	A third person explains, "We do that intentionally, to keep luring them back. The technology we gain when we manage to plunder one of their ships more than outweighs the cargo we lose."`
	
			label next
			`	While you're conversing with the group, a uniformed woman walks up and tells them something in sign language. They sign back and point to you. She says to you, "Thank you for your help. A Korath ship that came with the raiders and fled the battle is still lurking around our territory. Would you be willing to hunt it down?"`
			choice
				`	"Sure."`
				`	"Sorry, I don't have time to help you out."`
					decline

			`	"Thank you," she sings. "It keeps jumping between systems in our territory. Maybe its jump drive was damaged or something, and it cannot escape. I will spread the information that you've taken on the bounty for hunting it, so others will not risk their lives fighting it."`
				accept
	npc kill
		government "Korath"
		personality coward target uninterested marked waiting
		system
			distance 1 2
		fleet
			names "korath"
			# This ship has been here for a while and all its cargo outfits are gone, it just has commodities.
			cargo 4
			commodities "Food" "Clothing" "Metal" "Plastic" "Medical" "Heavy Metals"
			variant
				"Rano'erek (Crippled)"
		dialog "You have destroyed the Korath ship that was left over from the raid on <planet>. You can now return there to collect your payment."
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 500000
		dialog `The same woman meets you when you land on <planet>. "Again, thank you," she says. "I will suggest to others that they might offer you similar bounty hunting jobs in the future." She pays you <payment>.`
		log "Factions" "Remnant" `Recently, Korath ships have begun raiding Remnant worlds. The Remnant have decided not to try to discourage these raids, because they are a perfect opportunity to steal jump drives and other valuable alien technology from the Korath.`



mission "Remnant: Defense 3"
	landing
	name "Remnant surveillance"
	description "Travel to the <waypoints> system, destroy any Korath ships you find there, then deploy a Remnant surveillance satellite to give them advance warning of Korath raids in the future. Return to <planet> when you are done."
	source
		government "Remnant"
	to offer
		"Remnant: Bounty: done" >= 3
	cargo "surveillance equipment" 13
	waypoint "Parca"
	on offer
		conversation
			`A man approaches your ship soon after you collect your latest bounty, and sings, "You have been most helpful in fighting the Korath. Would you be willing to assist us in another way?"`
			choice
				`	"Sure, tell me more."`
				`	"Sorry, I'm not interested in helping you out anymore."`
					decline

			`	He explains that they hope to gain advance notice of future raids by setting up remote surveillance equipment in the system in the Ember Waste that is closest to Korath space. The equipment will communicate with the Remnant via something called an "entangled particle pair" that does not require a hyperspace relay network. Ironically, this is technology that the Remnant acquired by raiding the Korath decades ago.`
			`	"I will mark the target system on your map," he says, "and give you the equipment necessary to deploy the surveillance satellite. Please do not deploy it while any Korath ships are watching. Our scouts encountered Palavrets, but they have crippled them enough to where they should not be a problem."`
				accept
	on accept
		event "remnant: surveillance begin"
	npc kill
		government "Korath"
		personality heroic nemesis staying
		system "Parca"
		fleet
			names "korath"
			cargo 0
			variant
				"Palavret (Crippled)"
				"'olofez" 2
		dialog "Now that you are alone, you are able to deploy the Remnant surveillance satellite unobserved. Time to report back to <planet>."
	on visit
		dialog `You have returned to <planet>, but you haven't deployed the surveillance satellite yet. Return to <waypoints> and make sure that all of the Korath there have been eliminated.`
	on complete
		event "remnant: surveillance end"
		payment 500000
		conversation
			`When you return to <planet>, the same Remnant man meets you and says that they have begun receiving data from the surveillance satellite that you deployed. "Thank you for your assistance," he sings. He pays you <payment>.`
			choice
				`	"You're welcome."`
					decline
				`	"You know, a great way to say 'thank you' would be to offer me a license to buy your technology."`

			`	He grins, very slightly. "That is not my decision alone to make," he says, "but I will put in a word for you and see what I can do."`



conversation "remnant key stones"
	branch found
		has "Remnant: Found Keystones: offered"

	branch equipped
		has "outfit: Quantum Keystone"
	
	`As you are walking through the spaceport, a man comes up to you and introduces himself as the manager of the local outfitter. "Greetings, outsider," he says. "I have heard many good things about you and your assistance to our people. Would you be interested in going on a quest for me?"`
	choice
		`	"What kind of quest?"`
			goto quest
		`	"Sorry, I'm not interested."`

	`	"Please, I assure you, this quest will be very lucrative for you.`

	label quest
	`	"You may have noticed the red anomalies scattered within this region of space. What you may not have known is that these are wormholes, accessible only with the possession of a Quantum Key Stone. My people highly value these Key Stones because of this, but our mines produce very few of them." The manager shows you a Key Stone that he has with him.`
	scene "outfit/keystone"
	
	branch hai1
		has "First Contact: Hai: offered"
	
	`	"We have explored all of the Ember Waste, but have been unable to find any large concentrations of these stones."`
	`	"You seem to be able to easily explore outside of this region. If you manage to discover a source of Key Stones outside of the Ember Waste, would you please inform me of them?"`
	choice
		`	"If I find anything, I'll let you know."`
		`	"No thanks. This seems like a wild goose chase to me."`
			decline
	
	`	The outfitter manager thanks you. "We'll discuss payment once you return," he says.`
		accept
	
	label found
	`You find the outfitter manager and tell him that you have good news. "You found another world where the stones can be mined?" he asks.`
		goto exchange
	
	label hai1
	`	"I've seen that before," you say.`
	`	He looks at you with surprise. "You found another world where these stones can be mined?"`
		goto exchange
	
	label equipped
	`As you are walking through the spaceport, a man comes up to you and introduces himself as the manager of the local outfitter. He says, "I could not help but notice that you have a Key Stone that looks different from the ones from our mines. You may have noticed the red anomalies scattered within this region of space. What you may not have known is that these are wormholes, accessible only with the possession of a Quantum Key Stone. My people highly value these Key Stones because of this, but our mines produce very few of them. Have you found another world where these stones can be mined?"`

	label exchange
	choice
		`	"Yes, in the territory of some aliens far to the north of here."`
			goto hai2
		`	"Yes, but I would prefer not to tell you where."`
	
	`	"That is understandable," he says. "I am a businessman and I understand how valuable certain trade secrets can be. But perhaps I can interest you in a mutually profitable endeavor?"`
		goto more
	
	label hai2
	`	"Intriguing," he sings. "Are they aware of how valuable these stones are?" You tell him about the Hai, that they are an old species and that to them the Key Stones are just good luck charms. "Perhaps they have forgotten the true use of the Stones," says the man. "This may give us an opportunity for a mutually profitable endeavor."`
	
	label more
	`	"Tell me more," you say.`
	`	He says, "If you could fetch me a large supply of these stones, say fifty of them, I would purchase them from you for a high enough price that you would earn a tidy profit. What do you say?"`
	choice
		`	"Sure, I would be glad to accept that deal."`
		`	"Sorry, I'm really not interested in doing business with you Remnant folks."`
			decline
	
	`	After a bit of haggling, he agrees to pay you six million credits in exchange for a cargo of fifty Hai "keystones." Given how cheap they are to purchase in Hai space, you will be earning a very tidy profit on the deal.`
	`	"We look forward to receiving this shipment," he sings. "Just so we are clear, however: you do not need to install them on your ship - delivering them in your cargo hold will work just fine."`
	choice
		`	"I can purchase outfits into my cargo bay?"`
		`	"Why would you even need to specify that?"`
			goto whymention
		`	"Okay."`
			accept
	`	"Of course. There are several different methods available for doing so." He switches to a chant as he begins listing methods.`
	`	"Firstly, our outfitter interface has a small toggle labeled 'in-cargo' that - when checked - will instruct the dockworkers to load any outfits you purchase into your cargo bay instead of installing it.`
	`	"Secondly, if you do not have any ships selected in the outfitter control panel when you make a purchase, our logistics system will assign it for delivery to your cargo hold instead of scheduling an installation.`
	`	"Lastly, if you have an outfit installed, just tap the 'U' key on the outfitter to request that the selected outfit be uninstalled. After removal they will be left in your cargo hold."`
	`	He glances at his commlink and starts tapping at something. "We look forward to your return," he trills, before striding away still looking at his display.`
		accept
	label whymention
	`	"What seems straightforward to you and I is not always so simple for others. I have met more than a few pilots who thought that outfits could only be transported installed on their hull." He smiles briefly at the thought before turning and heading away.`
		accept



conversation "remnant key stones done"
	`You visit the local outfitter and tell the manager that you have brought a shipment of "quantum keystones" to sell to him. He is overjoyed, and gladly pays you six million credits for them. You can't help noticing that based on how much the Key Stones sell for here, he will be earning even more profit than you did, even though you did nearly all the work.`
	`	"You have made a valuable contribution to our people by doing this," he says. "These stones will allow more of our ships to explore the Ember Waste and discover the secrets that it holds."`



mission "Remnant: Key Stones (Pre-Hai) 1"
	name "Key Stones"
	description "The manager of the outfitter on <planet> is interested in finding alternative sources of Key Stones. The Remnant have explored the entire Ember Waste, so you will need to search elsewhere for these stones."
	source "Viminal"
	to offer
		not "outfit: Quantum Keystone"
		not "Remnant: Key Stones (Hai): offered"
		not "Remnant: Key Stones: offered"
		not "First Contact: Hai: offered"
		or
			has "event: remnant: void sprite research"
			has "Remnant: Defense 3: done"
	on offer
		conversation "remnant key stones"
		
	to complete
		has "Remnant: Found Keystones: offered"



mission "Remnant: Found Keystones"
	landing
	invisible
	source
		government "Hai"
	to offer
		has "Remnant: Key Stones (Pre-Hai) 1: active"
		has "First Contact: Hai: offered"
	on offer
		conversation
			`While exploring the Hai spaceport, you notice something interesting about some of the Hai ships. Many of them appear to be decorated with a stone that looks very similar to the Quantum Key Stones found in the Ember Waste. You ask a nearby Hai what they are, and she tells you that the stones are good luck charms that many Hai use on their ships that can be purchased from any Hai outfitter.`
			`	You should return to the Remnant outfitter manager to tell him about the stones in Hai space.`
				decline



mission "Remnant: Key Stones (Pre-Hai) 2"
	landing
	name "Key Stones"
	description "The manager of the outfitter on <planet> has offered to pay you six million credits in exchange for a shipment of fifty quantum keystones (which you will have to purchase from the Hai)."
	source "Viminal"
	to offer
		has "Remnant: Key Stones (Pre-Hai) 1: done"
	on offer
		conversation "remnant key stones"
		
	on visit
		dialog `You have returned to <planet>, but you don't have 50 "quantum keystones" to give to the outfitter. Buy the keystones from the Hai before returning here.`
	on complete
		outfit "Quantum Keystone" -50
		payment 6000000
		conversation "remnant key stones done"
	
	
	
	
mission "Remnant: Key Stones"
	name "Keystones"
	description "The manager of the outfitter on <planet> has offered to pay you six million credits in exchange for a shipment of fifty quantum keystones (which you will have to purchase from the Hai)."
	source "Viminal"
	to offer
		or
			has "outfit: Quantum Keystone"
			and
				or
					has "First Contact: Hai: offered"
					has "First Contact: Unfettered: offered"
				or
					has "event: remnant: void sprite research"
					has "Remnant: Defense 3: done"
		has "remnant: blood test pure"
		not "Remnant: Key Stones (Pre-Hai) 1: offered"
		not "Remnant: Key Stones (Hai): offered"
	on offer
		conversation "remnant key stones"
	on visit
		dialog `You have returned to <planet>, but you don't have 50 "quantum keystones" to give to the outfitter. Buy the keystones from the Hai before returning here.`
	on complete
		outfit "Quantum Keystone" -50
		payment 6000000
		conversation "remnant key stones done"



mission "Remnant: Void Sprites 1"
	name "Space creatures"
	description "A man on the Remnant homeworld of <planet> asked you to collect data on some strange space creatures in the <waypoints> system, in another part of the Ember Waste."
	source "Aventine"
	waypoint "Nenia"
	cargo "scanning equipment" 8
	to offer
		has "remnant: blood test pure"
	on offer
		conversation
			`As you explore the spaceport, you meet a Remnant man wearing some sort of optical prosthesis over his eyes, a visor with several tiny cameras mounted on it. "Ah," he sings, "the outsider. Human yet not of our culture, distinct from our mindset. That is useful. Would you be willing to invest in a research project?"`
			choice
				`	"Perhaps. Tell me more."`
				`	"Sorry, I'm not interested."`
					decline
			`	"Excellent," he sings. "Centuries ago, we discovered some space-dwelling organisms elsewhere in the Waste, and undertook to study them. Certain mistakes were made, certain underestimations, and we can no longer safely approach these organisms. Would you be willing to visit their home system and collect some sensor data? I call this an investment, because I cannot pay you until I publish the results of these studies."`
			choice
				`	"Yes, I'd be glad to."`
					goto end
				`	"Wait, that sounds super shady. Can you explain why you think it's safe for me to enter that star system, but not for you to do so?"`

			`	He says, "We studied the organisms and determined that they could not possibly be sentient. Therefore we saw no moral issues with collecting, well, ah... a sample. Unexpected things happened and certain grudges have been, ah, borne against Remnant ships for centuries as a result."`
			choice
				`	"Well, as long as you don't ask me to do something that will get me in similar trouble, I'll help you out."`
					goto end
				`	"Sorry, I'm not interested in helping you."`

			`	"Are you sure?" he chants. "We could learn some incredible things."`
			choice
				`	"No, I'm really not interested."`
					decline
				`	"Fine, tell me what you want me to do."`

			label end
			`	He sings, "Thank you. To begin with, all I ask is that you visit this star system and scan the creatures with certain special equipment that I will provide. Report back to me when you are done."`
			choice
				`	"How should I find you?"`
				`	"What is your name?"`
					goto name

			`	"Don't worry," he says, "I will find you. You are our only visitor from the outside in many decades; when you land here, it quickly becomes known."`
				accept
	
			label name
			`	He says, "My name is..." and then performs an elaborate gesture with his hands. "Do not worry if you can not perform my name," he says, "I will seek you out when you land. You will not need to ask around for me."`
				accept
	
	npc
		government "Indigenous Lifeform"
		personality timid mining harvests staying mute
		system "Nenia"
		fleet
			cargo 0
			variant
				"Void Sprite"
				"Void Sprite (Infant)" 3
	on enter "Nenia"
		dialog `There are indeed some strange space-faring life forms in this system. You collect measurements with the special sensors, and then prepare to return to <planet>.`
	on visit
		dialog `You have returned to <planet>, but you're missing something! Either you haven't visited <waypoints> to scan the void sprites, or your escort carrying the scanning equipment has not arrived in the system.`



mission "Remnant: Void Sprites 2"
	landing
	name "Scan the void sprites"
	description "Return to the <waypoints> system, and use an outfit scanner on one of each of the types of void sprites to see if you can tell how their propulsion works."
	source "Aventine"
	waypoint "Nenia"
	to offer
		has "Remnant: Void Sprites 1: done"
	on offer
		conversation
			`Sure enough, soon after you land, the Remnant researcher with the optical prosthesis arrives at your ship. When he looks at the data that you collected using his special scanners, he is disappointed. He chants, "I had hoped the scanners would show us how the creatures are able to generate enough force to fly out of the gravity wells of their planets, but this tells me nothing. Perhaps it would help if you scan them more closely. Could you equip your ship with one of the scanners that are used to inspect the outfits that ships are carrying, and see if that scanner yields additional information?"`
			choice
				`	"Okay, I'll install an outfit scanner and see what it can tell me."`
					accept
				`	"Are you sure they won't interpret the scanner beam as an attack?"`

			`	"I doubt it," he says. "It is a very low-power beam. And after all, you were not attacked just now when you scanned them with my equipment."`
			choice
				`	"Okay, I'll install an outfit scanner and see what it can tell me."`
					accept
				`	"Wait, are you saying that you thought I might get attacked last time around, and you didn't tell me that?"`

			`	He says, "It was a small enough chance that I did not see a need to worry you."`
			choice
				`	"Sorry, I don't want to help with this project anymore."`
					decline
				`	"Okay, I'll install an outfit scanner and see what it can tell me."`
					accept
	npc "scan outfits"
		government "Indigenous Lifeform"
		personality timid mining harvests staying mute
		system "Nenia"
		fleet
			cargo 0
			variant
				"Void Sprite"
				"Void Sprite (Infant)"
	on accept
		event "remnant: nenia empty"
	on visit
		dialog `You land on <planet>, but you haven't scanned the void sprites in <waypoints>. Make sure you scan all the void sprites using an outfit scanner.`
	on complete
		event "remnant: nenia restored"



mission "Remnant: Void Sprites 3"
	landing
	name "Visit void sprite planets"
	description `Use the Puffin to explore the two gas giants where the void sprites live. Then, return to <planet>.`
	source "Aventine"
	stopover "Nasqueron"
	stopover "Slylandro"
	cargo "scanning equipment" 8
	blocked "The Remnant researcher has another job for you, but you're going to have to free up some cargo space in order to take it on."
	to offer
		has "Remnant: Void Sprites 2: done"
	on offer
		conversation
			`The Remnant researcher seems disappointed that an outfit scan didn't reveal any information about the void sprites, but he is also excited about a new idea for studying them. "I found that we have several old mothballed ships suitable for exploring the upper atmosphere of a gas giant," he says. "Until I can publish my results I will not have the resources to compensate you, but I can provide you with one of our ships. Then you could land on the void sprite worlds and observe them in their natural habitat."`
			choice
				`	"How much will it cost to buy one?"`
				`	"Didn't you say before that anyone entering that system in a Remnant ship gets attacked?"`
					goto attack
				`	"Sorry, I'm not interested in helping you anymore."`
					decline

			`	"Only a few million credits," he says. "Do not worry, I will provide you with one. Consider it an advance on the resources I owe you. And, just think of how much you will be doing to advance the cause of science."`
				goto end

			label attack
			`	"Do not worry about it," he says. "These exploration craft are exceptionally fast and maneuverable. Even if you do provoke a negative reaction, you should be able to dodge any direct confrontation."`

			label end
			choice
				`	"Okay, I'll do it."`
				`	"Sorry, that's more than I'm willing to commit to."`
					decline

			`	"Excellent," he says. "This ship is an antique, so be careful with the shields. They are projected around the ship and are unable to adapt to new obstacles. Hard-shell shields, I believe they were called at the time of the Exodus, as opposed to the skin shields of today that fit close to the hull." He pauses and looks thoughtful, then continues. "Just make sure nothing valuable is near the hull when the shields activate - it will either be sheared in two or break the shields. And it is important to know that the pressure suit included with the ship is able to remotely activate and deactivate the shields and other ship systems."`
			`	He moves to step away, then looks back at you. "My notes indicate that there is a superstition about how visiting Crataegusa in the Cardea system was considered to bring good fortune to explorers. There is no scientific reason that should be the case, but might be worth landing on it anyway."`
				accept
	on accept
		event "remnant: puffin"
		give ship "Puffin" "Shadow in the Depths"
	npc
		government "Drak (Hostile)"
		system "Nenia"
		personality staying heroic nemesis frugal uninterested
		ship "Archon (Cloaked)" "Lifted Lorax"
	on stopover
		conversation
			`You have dodged the Archon and landed on the second of the two gas giants where the void sprites live. The hull of your tiny ship creaks and groans under the high atmospheric pressure, but seems to be holding together. Its sensors pick up flocks of void sprites floating between the planet's cloud layers, presumably feeding on airborne creatures too small to detect from this range.`
			`	You also observe some void sprites leaving the planet, soaring upward on thermal updrafts. As they rise, their bodies swell to several times their original size, like an aerostat balloon gaining altitude. But clearly they have another form of propulsion as well, something akin to the antigravity repulsors that human ships use to travel from a planet's surface into orbit.`
			`	After collecting some atmospheric samples for good measure, you prepare to return to <planet>. Hopefully the Archon will calm down once it sees that you have not attacked or disturbed the Sprites on either of these planets.`
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		event "remnant: void sprite research" 20
		log "Factions" "Void Sprites" `The "void sprites" are space-dwelling lifeforms. They are apparently not sentient. They evolved in the atmosphere of a gas giant, but have some biological mechanism for altering or reflecting gravity that allows them to fly into outer space, in the same way that human ships use antigravity to escape a planet's gravity well. The void sprites are not particularly powerful or dangerous creatures, but they are guarded by a Drak Archon.`
		log "Factions" "Archons" `Archons are partly biological, but do not seem to be naturally evolved creatures. Some of their biological characteristics may have been based on the "void sprites" that inhabit the Ember Waste.`
		conversation
			`The Remnant researcher is ecstatic when he sees all the data you collected. "I will begin assembling this into a research paper immediately!" he sings. "It may be months before it is published, but when it is you will be named as a co-author, and I will share the credit with you."`
			choice
				`	"What do you know about the Archon that attacked me?"`
				`	"I'm glad I could help you out. I'll look forward to hearing from you."`
					decline

			`	He begins singing you a song about the Archons. The song says that the Archons are servants of the mysterious Drak, whom no one has seen but whom the Quarg claim to speak to and take orders from. "That's all our histories say," he sings, "but what interests me is the biological similarities between the Archons and the void sprites. We do not think the Archons are naturally evolved creatures. Perhaps their creators incorporated elements of void sprite biology into them when they were made. Or perhaps the Archons just feel an affinity with them because they are both space-faring organisms."`
			choice
				`	"Well, I'll look forward to hearing the results of your research when it is done."`
					decline
				`	"Do you think the Archons will continue to be angry at me?"`

			`	He says, "As long as you did not harm any of the void sprites, I doubt they will bear you a permanent grudge. The Archons are thinking creatures, after all; they cannot blame you for your curiosity."`
			`	You thank him for the information and tell him that you will look forward to reading the results of his study (and, getting paid for your help) once it is complete.`



mission "Remnant: Gascraft-Puffin Compatibility"
	landing
	invisible
	to offer
		has "event: remnant: gascraft"
	on offer
		event "remnant: puffin"
		clear "event: remnant: gascraft"
		fail



mission "Remnant: Technology Available"
	name "License Training"
	description "Transport a prefect to <destination> so he can tell you more about the Remnant license."
	landing
	invisible
	source
		government "Remnant"
	destination
		government "Remnant"
		not distance 0
	to offer
		has "event: remnant: void sprite research"
		has "Remnant: Defense 3: done"
		or
			has "Remnant: Key Stones: done"
			has "Remnant: Key Stones (Hai): done"
			has "Remnant: Key Stones (Pre-Hai) 2: done"
			has "Remnant: Broken Jump Drive 2: done"
	on offer
		payment 600000
		set "license: Remnant"
		log "The prefects have reached a consensus: now considered a valuable friend of the Remnant, and given permission to purchase their ships and technology."
		conversation
			`An elderly man approaches your ship and introduces himself as a local "prefect," presumably some sort of government position. In a song so elaborate that he must have composed and practiced it ahead of time, he informs you that a scientific study on the void sprites has just been published, and as the co-author you are entitled to a payment of two million credits, which he presents to you.`
			`	"When your name came up in the study," he says, "I asked around and discovered that you have helped us in other ways as well. The other prefects have reached a consensus that you should be considered a valuable friend of the Remnant, and shall henceforth be given permission to purchase our ships and technology." He hands you a small cube that looks like it is made of interlocking blocks of material similar to their ships.`
			scene "outfit/remnant license"
			choice
				`	"I'm honored. Thank you."`
					goto onwards
				`	"Is there anything else I can do to assist your people?"`
			`	"I do not have anything at the moment," he says, "but I am sure other Remnant will have tasks you can help with, now that you have demonstrated your trustworthiness. We have been keeping track of you, and we are impressed with your curiosity, perseverance, and ability to survive where most would be destroyed. All three are valued characteristics among the Remnant, and thus many will welcome your assistance on their projects."`
			label onwards
			`	As he talks, he gestures for you to walk with him towards a nearby hall. Inside, you discover that it is one of the many cafeterias that seem to be common in Remnant starports. He picks up two trays from the window and leads you to an empty table. "While you are welcome to become one of us, we suspect that you are a citizen of the galaxy - wandering hither and yon building coalitions and enmities with species and groups across the breadth of accessible space, unfettered by conventional allegiances. As such, we hope that you will continue to explore and stop by to let us know what you have found. We ask only that you keep the secret with which you are trusted and bring us word of anything that might influence humanity's long-term survival."`
			choice
				`	"What secret do you want me to keep?"`
					goto secret
				`	"I would be honored to be one of the Remnant."`
					goto honored
				`	"While I have enjoyed my time among you, I can never stay in one place."`
					goto traveler
				`	"What constitutes 'things that influence humanity's survival'?"`
			label survival
			`	He takes a bite before responding. "Basically, anything that might either pose an existential threat to humanity, or anything that we might learn from and put to use to ensure humanity's survival. It might be an invading fleet of automated machines or a spaceborn plague. But it is just as possible you might find beings that we can work alongside to form strong partnerships or ancient ruins with old technology that points us towards new discoveries. The possibilities are indeed infinite."`
				goto feast
			label honored
			action
				set "remnant: desired to join them"
			`	He nods, smiling. "You are not there yet, but I think you might well become one of us before too long." He takes a bite from his plate, then continues. "Keep learning, and you may well earn yourself a place among us."`
			choice
				`	"What secret do you want me to keep?"`
					goto secret
				`	"What constitutes 'things that influence humanity's survival'?"`
					goto survival
			label traveler
			`	He nods. "Thank you for confirming our impression. We are grateful to have you with us, and look forward to hearing about your travels."`
			choice
				`	"What secret do you want me to keep?"`
					goto secret
				`	"What constitutes 'things that influence humanity's survival'?"`
					goto survival
			label secret
			`	He sips on a thick drink before responding. "Quite simply, the fact that we are here. To the best of our knowledge, only the Drak and the Korath know that we exist, and of those only the Korath have raided our worlds. Our intention is to be the last bastion of humanity, and we rely on secrecy to achieve that goal." He pauses for a moment to eat, then he continues. "The Alphas are a fearsome threat, but they may be the least of humanity's worries in the grand scheme of things. We strive to maintain whatever advantages we can in case any of those threats proves itself such, and one of our best tools is surprise. If no one knows we are here, we have the advantage over any that might seek to conquer or destroy us.`
			`	"Of course, maintaining the secrecy of our capabilities is also very important - and the reason why you had to prove yourself before we let you purchase our ships and outfits - but it is secondary to the fundamental secrecy of our existence. Ideally, no one should know we exist. Those who do know should think of us as little more than refugees struggling to survive in a hostile environment."`
			label feast
			`	He waves dismissively. "I am sure you have more questions, but let us leave it there for now. Our meals await, and, well, I need to show you some things in regards to our security procedures. So finish your meal, and let's head over to <destination>."`
				accept
	on enter
		conversation
			`Once you reach space, the prefect interrupts your normal routine. "I'm sure you've noticed that your 'license' isn't exactly a normal ID card. There's a reason for that, namely that it has extra circuitry in it and includes a couple sensors on the surface. I don't understand everything in it, but the security specialists assure me that it is incredibly resistant to being hacked or compromised."`
			choice
				`	"Okay, sounds good."`
					goto continue
				`	"How do you know what regular licenses look like?"`
			`	The old man smiles. "While we might not have access to modern licenses, we do have all our old entertainment programs from before the Exodus. Some of them included details such as what licenses looked like. While things might have changed in the intervening years, licenses were historically governed by petty bureaucracy, and those are very resistant to change. So it seemed very likely that things have not changed much. And definitely not so much as to resemble ours." He seems amused, but then his smile fades.`
			`	"Then again, ancestral space never designed their licenses to withstand much. They are incentivized to be not so secure, are they not? Enough money and the right connections, and licenses for anything can be acquired. These?" He holds up a Remnant license. "Not so much." He shakes his head and becomes serious. "Now, your license has a handful of connection pads on the bottom which can be connected to your ship's IFF. When you are inbound for landing, simply tap this code on the license, and the cube will verify the pattern as well as your fingerprints and a few other biometrics to ensure you are indeed living and conscious, and then transmit an encrypted code. Our IFF systems will verify the transmitted signal and respond accordingly."`
			choice
				`	"That sounds thorough."`
					goto thorough
				`	"So why have I not been shot down yet?"`
					goto shotdown
				`	"What is an 'IFF' system?"`
			`	"You aren't familiar with IFF?" he asks, looking slightly incredulous. "IFF stands for 'Identify Friend or Foe,' and is the general name for the system that identifies your ship to those around it. It is what determines which ships should be highlighted red or orange on your system map, and provides limited movement detail to allied ships so that targeting systems can fire past you. I do not know about their current practices, but historically the Navy and most other organizations had complex methods of verifying the identify of other ships, so it is not simply a case of having your IFF state that you are a friendly."`
			choice
				`	"Thanks for the explanation."`
					goto continue
				`	"That sounds thorough."`
					goto thorough
				`	"So why have I not been shot down yet?"`
			label shotdown
			`	"Because every system has potential failures and vulnerabilities, we ensure that people are always involved in the decision making process. Our initial scans showed that you were not likely an Alpha, and we were curious as to who you were and what opportunities might come of it. Since then the various monitors of the system have had to manually designate you as 'friendly' every time you made an approach. It worked, for a time. But now it is time to make your acceptance official. While our monitors are effective, it still wastes time to force them to track you and cancel the alerts every time you approach. Since you are trustworthy, better to give you the means to identify yourself so our defenses can focus on real threats.`
				goto continue
			label thorough
			`	The prefect nods in agreement. "We take our security very seriously.`
			label continue
			`	"Now, before we arrive at <planet>, pick a pattern for yourself. Something short - a second or two at most, and something memorable to you." The prefect turns away from you to install a small device on the side of one of your bridge consoles, and connects a few wires into the panel. "Now, insert your license here, and tap your pattern on the license." He looks away as you follow his directions.`
			`	"Done? Good. When we approach <planet>, you will have a few options: for a normal approach when everything is nominal, tap your pattern on the license. If there is a threat following you in - an enemy ship or some other kind of danger you want the monitors to watch for, pinch or squeeze the license instead. And if you have a problem onboard, such as having been captured and forced to fly the ship in, tap the license in a random pattern. Lastly, if you are having trouble landing due to injury or damage to the ship, just press briefly on the license. If you don't touch the license at all, the monitors will assume that you are either incapacitated or otherwise not in command of your ship. We will still attempt to let you land safely and provide assistance, but will also be standing ready to destroy you and block your approach if we think you are becoming a threat."`
	on complete
		conversation
			`As you enter the upper atmosphere of <planet>, the prefect gestures toward the small bracket he installed on your console. You insert your license and tap the pattern you created. He checks his commlink and then nods. "Your license and clearance have been accepted, Captain <first>. Carry on with landing as normal."`
			`	You proceed with the approach and landing, with the prefect pointing out noteworthy features along the way. He also points out various approach paths, including preferred routes to take if you are being chased. "If you have a hostile threat on your tail, take this landing corridor, which will expose trailing ships to fire from these points. And if you have something sticking tight in your shadow, do a roll at this point or that point. That will expose them to our high-precision batteries."`
			choice
				`	"Thank you for the advice."`
					goto conclusion
				`	"I'm surprised you are telling me all this."`
			`	"Oh, do not worry that you know too much. There are far more defenses that I have not mentioned, and we are always improving them. Generally, our defenses should be invisible to you - as in, they stay out of your way."`
			label conclusion
			`	Your approach goes smoothly, and you glide past a number of anti-air batteries that are methodically covering the sky around you. Once the <ship> has settled safely to the ground, the prefect pulls the license from the socket and hands it back to you. "At the risk of sounding like a parody: keep it secret, keep it safe. May the Embers burn bright for you." And with that, the old prefect walks off your ship.`



mission "Remnant: Learn Sign 1"
	name "Learn Remnant Sign"
	description `Travel to <destination> for more lessons on how to speak using Remnant sign language.`
	minor
	source "Caelian"
	destination "Aventine"
	repeat 3
	to offer
		has "Remnant: Void Sprites 3: done"
		has "Remnant: Defense 3: done"
		not "Remnant: Learn Sign 1: done"
		not "Remnant: Learn Sign 1: active"
		random < 30
		or
			has "Remnant: Key Stones: done"
			has "Remnant: Key Stones (Hai): done"
			has "Remnant: Key Stones (Pre-Hai) 2: done"
			has "Remnant: Broken Jump Drive 2: done"
	on offer
		conversation
			`As you make your way through the spaceport, you become increasingly aware of how quiet it is. Looking around, you note that it doesn't seem any less busy than usual, just that only a handful of people are paying attention to you. As a result, they have reverted to their normal gestures instead of singing. It feels oddly isolating, and eerie, to realize that there are hundreds of conversations going on around you, yet you can't understand a single one.`
			choice
				`	(Ask someone to teach me.)`
				`	(Ignore it.)`
					decline
					
			`	Looking around the spaceport, you eventually find someone at what looks like an information desk.`
			choice
				`	"I would like to learn your sign language."`
					goto words
				`	(Sing a short verse about not understanding people because my hands are still.)`
					goto song
			label words
			`	She looks at you with a confused expression, her hands making a few quick gestures. After a moment she points at the hand scanner embedded in the desk.`
				goto scan
			label song
			`	She looks surprised, but then recovers and sings a verse about how hands can learn, but must be cautious, and gestures at the hand scanner embedded in the desk.`
			label scan
			`	As you place your hand on the scanner, you feel a quick tingle as it scans your hand, then a pinprick as it extracts a drop of blood. The lady behind the desk looks at her screen. She nods, taps on the screen a few times, then retrieves a data pad from beneath the desk.`
			`	She hands the pad to you, and sings a brief verse about perseverance and hope.`
			`	Back on your ship you flip the pad on. The data pad appears to be loaded with a number of historic musicals and operas where the meaning of the lyrics has been replicated with gestures as subtitles. It is interspersed with what appear to be Remnant children's videos slowly explaining gestures and pausing to give you the opportunity to practice.`
			`	You spend a few hours going through the lessons. It takes a while to start vaguely understanding the signs, but you eventually learn how to sign a number of basic phrases. Eventually, the pad goes black and a note pops up on the screen informing you that additional lessons are available from the director's desk on Aventine.`
				accept

mission "Remnant: Learn Sign 2"
	landing
	name "Learn Remnant Sign"
	description `Travel to <destination> for more lessons on how to speak using Remnant sign language.`
	source "Aventine"
	destination "Viminal"
	to offer
		has "Remnant: Learn Sign 1: done"
	on offer
		conversation
			`While searching for the director's desk in the Aventine spaceport, you are very conscious of all the conversations going on around you. You manage to catch a word here and there, but not enough to understand the conversations. With some trouble, you ask for directions using what you have learned, and you arrive at a similar desk in a busy plaza.`
			`	It looks like the person behind the desk has been expecting you. They gesture very slowly, asking how your lessons are going using very basic signs and songs. After a few minutes of conversation, they ask you to place your hand on the scanner, which takes a sample of your blood, and then give you a data chip with more lessons.`
			`	You return to your ship and begin going through the lessons. These lessons focus more on purely conversing through sign with almost no singing.`
			`	Just as last time, the screen goes black and reveals a note saying that there will be a final package of lessons waiting for you on Viminal.`
				accept

	on complete
		event "remnant: sign studies complete" 60
		log "Have been introduced to the basics of the Remnant sign language. Will need to practice using the video lessons for some time in order to fully understand Remnant sign language."
		conversation
			`As soon as you land, you look around for someone to ask directions from. Approaching a dockhand who doesn't appear to be busy, you carefully sign, "Can you direct me to the port director?" He looks at you curiously for a moment and replies with exaggerated slowness. You thank him and head towards the spaceport following his directions.`
			`	Once again the director seems to be expecting you, and has a simple conversation with you about how the flight was and how your lessons are progressing. You manage to convey that you have learned a bit, and he gives you a few tips on your rehearsed phrases before directing you to place your hand on the scanner. Once again, the scanner takes a sample of your blood.`
			choice
				`	(Sign asking what the scanners are for.)`
				`	(Sing a verse about my confusion of the hand scanners.)`
			`	The man begins to sign, but then realizes that you don't understand much of what he is signing, so he switches to singing. "Long ago it was decided that being infiltrated by Alpha agents was a big risk, and we couldn't depend on our interstellar network to remain secure. So we implemented a policy where the first time a Remnant is granted formal access to a new planet their purity and identity is verified. Thus even if someone hacked our networks to give themselves a clean identity, they would still be caught when they started working on a new planet. We also don't broadcast that requirement on our networks, simply enforce it locally. It isn't foolproof, but it adds an additional layer of safety."`
			`	You thank the man for explaining the scanners to you and accept the next set of lessons.`
			`	You spend a few hours viewing some of the lessons, one of which involves watching an ancient show about a merchant captain making his way through the galaxy with an unlikely crew, re-enacted by a cast of Remnant who sing and sign their way through the dialogs with exaggerated simplicity. It is oddly familiar, but you can't quite place it. You notice that it seems to have a lot of subtext about the dangers of manipulation and government secrecy, especially surrounding genetics.`
			`	Skimming through the rest of the lessons, you notice that there is a lot more here than the last two times. It may take some time to get through it all, but you should be fairly fluent if you practice over a couple of months.`



mission "Remnant: Learn Sign Follow Up"
	invisible
	source
		government "Remnant"
	to offer
		has "event: remnant: sign studies complete"
	on offer
		log "Have achieved a degree of fluency in the Remnant sign language sufficient for general conversation."
		conversation
			`As you make your way into the spaceport, it occurs to you that one of the information directors who gave you the instructional videos might appreciate how much you have learned over the past months of practice. You stretch your fingers and stop by the desk where you are able to have a simple conversation with the information director.`
			`	"Congratulations, Captain <last>!" the director signs. "Your fluency is good enough that even those unwilling to sing with a stranger should be comfortable working with you. At this rate you will be one of us in more ways than just by blood. I look forward to seeing what results from your work with us." The director is interrupted by the arrival of other Remnant asking for something and bids you farewell with an apologetic gesture.`
				decline



mission "Remnant: Deep Surveillance"
	name "Investigate Ivan"
	description "Travel to <stopovers> where Ivan's office is in order to ask him what he knows about the Ember Waste, then return to <destination> with your findings."
	minor
	source
		government "Remnant"
	stopover "Valhalla"
	to offer
		has "license: Remnant"
		or
			and
				has "Terminus exploration: done"
				not "Deep: Remnant 0: done"
			has "Deep: Remnant Research: offered"
	on offer
		conversation
			branch "told before"
				has "remnant: told about deep"
			
			branch terminus1
				not "Deep: Remnant Research: offered"
			
			`	While wandering the spaceport, you think back to the scientists from the Deep that you helped discover the Ember Waste. Given that the Remnant value their secrecy, they may be interested in knowing about this.`
			choice
				`	(Find a prefect to tell.)`
					goto telling
				`	(Don't tell the Remnant.)`
					decline
			
			label terminus1
			`	While wandering the spaceport, you think back to the scientists researching the wormhole in Terminus. Given that the Remnant value their secrecy, they may be interested in knowing about this.`
			choice
				`	(Find a prefect to tell.)`
				`	(Don't tell the Remnant.)`
					decline
			
			label telling
			action
				set "remnant: told about deep"
			`	You ask one of the Remnant in the spaceport where you would be able to find a prefect, and they point you to what looks like an information desk of sorts. There you tell the attendant that you have something potentially important to discuss in regards to Remnant security. They tap a few buttons then give you directions down a hallway. You quickly find yourself in an armory where several Remnant guards are in the process of cleaning their weapons. One stands up and comes over to you.`
			`	"Greetings, Captain. I am Prefect Torza. I was told you had information that could be important to our security." He takes a seat on a bench on the far side of the room from the other Remnant and gestures for you to do the same. "What do you have to tell us?"`
			branch terminus2
				not "Deep: Remnant Research: offered"
			
			choice
				`	"I helped a group of scientists from the Deep to discover the Ember Waste."`
				`	"A group of scientists from the Deep has discovered the Ember Waste."`
					goto discovered
			
			action
				set "remnant: admitted to helping deep"
			`	Torza's eyes go wide. "Why would you do this?" he asks. "Do you not understand that our secrecy is of utmost importance?"`
			choice
				`	"I don't believe that they will be a threat to you."`
					goto threat
				`	"I'm sorry, but I helped them before coming to understand this."`
			
			`	Torza seems to relax slightly. "This is unfortunate. I cannot get angry at you for that which you did not understand. But now that you do understand, seek to not make this same mistake in the future.`
			`	"What do they know?"`
				goto knowledge
			
			label terminus2
			choice
				`	"I helped a group of scientists who were researching the wormhole in Terminus."`
				`	"I discovered that a group of scientists are researching the wormhole in Terminus."`
			
			`	"Do they know how to enter it?" Torza asks, not sounding concerned with this new information.`
			`	"No," you say. "But they know, or at least think, that it is a wormhole, and are attempting to learn how to enter it."`
			`	"Well, it is unlikely that they will ever learn. The only way to stabilize the wormholes is by using a Key Stone, but I have never heard of one being found in Ancestral space. Learning what these scientists know would still be helpful, though. Would you be able to get us a copy of their findings?"`
			choice
				`	"I'll try. The lead scientist told me where his office is."`
					goto accept
				`	"I'm sorry, but I don't believe I'll be able to."`
			`	"This is unfortunate," Torza responds. "But thank you for informing us about this. I do not expect anything to come of this for now, but should anything occur we can be more prepared than we otherwise would have been." Torza gets up from the bench and shows you out. "May the Embers burn bright for you."`
				decline
			
			label accept
			`	"This is good," Torza responds. "Once you have the findings, simply return to the spaceport here and give them to the information desk. We will look over them shortly thereafter." Torza gets up from the bench and shows you out. "Have a safe journey, Captain. May the Embers burn bright for you."`
				accept
			
			label "told before"
			`	Since you last told the Remnant about Ivan's research on the wormhole in Terminus, you have helped him to discover the Ember Waste. The Remnant may be interested in being updated on Ivan's progress.`
			choice
				`	(Find a prefect to tell.)`
				`	(Don't update the Remnant.)`
					decline
			
			`	You approach a spaceport information desk and ask to see Prefect Torza, who you spoke to the last time you informed the Remnant about the Deep researching the wormhole. Luckily, Torza is on-world at the moment, and you are told to meet him in the cafeteria. When you arrive, you find that Torza has just finished a meal and was leaving.`
			`	"Ah, Captain. I was told you were looking for me. We should find a private place to talk."`
			`	You follow Torza to a similar armory as before. "Is there an update to the research on the Threshold that the Deep are doing?" he asks after sitting down.`
			choice
				`	"I've helped the scientists learn how to pass through the wormhole."`
				`	"The scientists have discovered how to pass through the wormhole."`
					goto discovered
			
			action
				set "remnant: admitted to helping deep"
			`	Torza's eyes go wide. "Why would you do this?" he asks. "Do you not understand that our secrecy is of utmost importance?"`
			choice
				`	"I don't believe that they will be a threat to you."`
					goto threat
				`	"I'm sorry, but I helped them before coming to understand this."`
			
			action
				set "remnant: lied to torza: understanding"
			`	"Liar!" Torza yells at you while standing up from the bench. "You told us of these scientists after we had already trusted you with a license." Torza walks away from you angrily, then turns his head.`
			`	"What do they know?"`
				goto knowledge
			
			label threat
			`	"It is not a matter of them being a threat," Torza says angrily. "They may be peaceful, but who they tell or who may learn from them may not.`
			`	"What do they know?"`
				goto knowledge
			
			label discovered
			`	Torza's eyes go wide. "What do they know?"`
			
			label knowledge
			choice
				`	"They don't know about the Remnant, at least not yet."`
					to display
						has "deep: did not reveal remnant"
				`	"They have only discovered the void sprites."`
					to display
						has "deep: did not reveal remnant"
					goto sprites
				`	"They know where the Remnant are in the Ember Waste."`
					to display
						has "deep: did reveal remnant"
					goto location
				`	"They have scans of a few Remnant ships."`
					to display
						has "deep: did reveal remnant"
					goto scans
				`	"They have samples of some Remnant technology."`
					to display
						has "Deep: Remnant: Engines: done"
					goto tech
				`	"They are actively surveilling Remnant worlds."`
					to display
						has "Deep: Remnant Surveillance: done"
					goto surveilled
			
			action
				set "remnant: told that deep knows nothing"
			`	Torza seems to calm down greatly after hearing this. "This is most fortunate. We will need to work to ensure that this remains the case."`
				goto end
			
			label sprites
			action
				set "remnant: told that deep knows sprites"
			`	Torza seems to calm down greatly after hearing this. "Then may they not anger the Archon with their curiosity, as we have."`
				goto end
			
			label location
			action
				set "remnant: told that deep knows location"
			`	Torza pauses for a long while. "I assume it only makes sense that they would know of us after discovering the Ember Waste."`
				goto end
			
			label scans
			action
				set "remnant: told that deep has scans"
			`	Torza pauses for a long while. "These scientists knowing of our whereabouts is much more of a concern than them having scans of our ships."`
				goto end
			
			label tech
			action
				set "remnant: told that deep has tech"
			`	"And you were the one who brought it to them," Torza responds.`
			branch reciprocal
				has "Remnant: Tech Retrieval: done"
			
			choice
				`	"Yes, but what I do with your technology after buying it is none of your concern."`
					goto concern
				`	"No, they obtain it by other means."`
					goto other
			
			label reciprocal
			choice
				`	"Yes, but it is no different than me bringing technology from the Republic to you."`
				`	"No, they obtained it by other means."`
					goto other
			
			`	Torza scowls in response to this, but doesn't say anything.`
				goto end
			
			label concern
			`	"What you do with our technology is much of a concern to us!" Torza yells.`
				goto end
			
			label other
			action
				set "remnant: lied to torza: technology"
			`	Torza grits his teeth. "There are no reports of missing ships or outfits, and the only visitor capable of delivering our technology is you."`
				goto end
			
			label surveilled
			action
				set "remnant: told about surveillance"
			`	"How are they doing this?" Torza asks.`
			choice
				`	"Surveillance devices have been placed in each of your spaceports."`
				`	"I don't know. I only know that they are."`
					goto secret
			
			action
				set "remnant: told about cubes"
			`	Torza punches a wall in anger, then relaxes. "Thank you for telling us this. We will search for and remove these devices immediately."`
				goto end
			
			label secret
			`	"Whatever methods they are using, we will discover them in due time," Torza says.`
			
			label end
			`	Torza begins tapping on a data pad. "We must act to rectify this situation," he says calmly.`
			branch repeat
				has "retrieved before"
			
			`	"I presume that you know of the whereabouts of these scientists. Would you be able to get us a copy of their findings?"`
			choice
				`	"I'll try. The lead scientist told me where his office is."`
					goto accepted
				`	"I'm sorry, but I don't believe I'll be able to."`
					goto decline
			
			label repeat
			`	"You have brought us the information that these scientists had before. I ask that you do so again."`
			choice
				`	"I'll return with their information as quickly as I can."`
					goto accepted
				`	"I'm sorry, but I don't believe I'll be able to."`
					goto decline
			
			label decline
			branch revealed
				has "deep: did reveal remnant"
			
			branch admitted
				has "remnant: admitted to helping deep"
			
			`	"This is unfortunate," Torza responds. "But thank you for informing us about this. We will be on high alert to see if these scientists make any moves deeper into the Ember Waste." Torza gets up from the bench and shows you out. "May the Embers burn bright for you."`
				decline
			
			label admitted
			`	"This is unfortunate," Torza responds. "But thank you for informing us about this. We will be on high alert to see if these scientists make any moves deeper into the Ember Waste." Torza gets up from the bench and shows you out. "We may also be keeping a closer eye on you going forward to avoid another situation like this."`
				decline
			
			label revealed
			branch liar
				or
					has "remnant: lied to torza: technology"
					has "remnant: lied to torza: understanding"
			
			`	"This is unfortunate," Torza responds. "Very unfortunate. We will be on high alert to see if these scientists make any moves. I at least commend you for giving what information you have to us." Torza gets up from the bench and shows you out without another word.`
				decline
			
			label liar
			action
				set "remnant: player is surveilled"
			`	"Then perhaps the Remnant should reassess their trust placed in you," Torza responds. "We will be on high alert to see if these scientists make any moves. I at least commend you for giving what information you have to us, but know that you will be watched closely by us from now on." Torza gets up from the bench and shows you out without another word.`
				decline
			
			label accepted
			branch revealed2
				has "deep: did reveal remnant"
			
			branch admitted2
				has "remnant: admitted to helping deep"
			
			`	"This is good," Torza responds. "Once you have the findings, simply return to the spaceport here and give them to the information desk. We will look over them shortly thereafter." Torza gets up from the bench and shows you out. "Have a safe journey, Captain. May the Embers burn bright for you."`
				accept
			
			label admitted2
			`	"This is good," Torza responds. "Once you have the findings, simply return to the spaceport here and give them to the information desk. We will look over them shortly thereafter." Torza gets up from the bench and shows you out. "Have a safe journey, Captain. But know that we may be keeping a closer eye on you going forward to avoid another situation like this."`
				accept
			
			label revealed2
			branch liar2
				or
					has "remnant: lied to torza: technology"
					has "remnant: lied to torza: understanding"
			
			`	"This is good," Torza responds. "Once you have the findings, simply return to the spaceport here and give them to the information desk. We will look over them shortly thereafter." Torza gets up from the bench and shows you out without another word.`
				accept
			
			label liar2
			action
				set "remnant: player is surveilled"
			`	"This is good," Torza responds. "Once you have the findings, simply return to the spaceport here and give them to the information desk. We will look over them shortly thereafter." Torza gets up from the bench and shows you out. "Know that you will be watched closely by us from now on, Captain. I commend you for agreeing to bring us this information, but we cannot allow another situation like this to occur."`
				accept
	
	on stopover
		"retrieved information" ++
		conversation
			branch "retrieved before"
				"retrieved information" == 2
			
			`	You look up the location of Ivan's office that he gave you back when you helped him save the science drone in Terminus and find that it is in a building just outside the spaceport, just one room among many in a massive office complex. The complex looks pristine by Dirt Belt standards, but when compared to architecture you've seen elsewhere in the Deep, it's rather brutalistic.`
			branch gone
				has "Deep: Remnant Research: offered"
			
			`	You ask a receptionist what Ivan's room number is, and he points you to a room on the twentieth floor. After taking an elevator up, you knock on the door to Ivan's office.`
			`	"Who is it?" Ivan says before peaking out the blinds. "Oh! Captain <last>! Please, come in."`
			`	Ivan opens the door and lets you inside. The office is cramped, the walls almost entirely obscured by filing cabinets. Ivan walks over to a desk that he barely has space to get behind, picking up a collection of papers and shoving them into the nearest cabinet. "Sorry about the mess," he says nervously. "I didn't know you were coming. Is there something I can help you with?"`
			choice
				`	"I was wondering if you'd found out anything new about the anomaly in Terminus."`
				`	"Do you think I could get a copy of your research on the anomaly in Terminus?"`
					goto "terminus copy"
			
			`	"Oh, yes. We haven't been able to do too much with what funding we have left, but we have made one important discovery." Ivan turns to one of his filing cabinets and pulls out some sort of graphic that you would guess is depicting the anomaly, but you can't make any sense of it.`
			`	"One of our ideas has been that the anomaly is some sort of unstable wormhole. Reports of its existence go back to at least the times of the first Alpha War, with rumors that ships have left for Terminus to never return, presumably having entered the anomaly somehow. Now I'm not one to go off of rumors, but they certainly have to come from somewhere, so the idea was at least worth investigating.`
			`	"Going under the assumption that it is a wormhole that is simply too unstable to allow a ship to pass through, we wanted to see if we could get anything at all to pass through. What we've discovered is that given a small and smooth enough object, we can get it to disappear within the anomaly without a trace." He then pulls out a small metallic sphere about the size of a ping pong ball from one of the cabinets which he holds onto by a wire.`
			`	"Now this is only a model, but we created a number of small sensors about this size and sent them through the anomaly. We'd hoped that we could take some readings from whatever is on the other side of the anomaly, as it clearly goes somewhere, but we only ever get static coming back through the wire, followed by nothing a few minutes later. And unfortunately, whatever we send in we can't seem to pull back. The wire always snaps.`
			`	"So the anomaly is clearly a wormhole. Now we just need to figure out how to get whatever we send into it to come back, and how to get something the size of a ship to enter it."`
			`	"Sounds like you're making good progress," you respond. "Do you think I could get a copy of your research so far?"`
			
			label "terminus copy"
			`	"A copy?" Ivan looks off into space for a moment. "Well, I suppose since you helped us from losing valuable equipment, I could make an exception for you. I typically don't share findings with those not on my research team until they're finalized. I've been burned one too many times because of that."`
			`	Ivan moves to another filing cabinet and pulls out a number of folders. "This will be for your eyes only. Promise you won't share this with anyone."`
			choice
				`	"I promise."`
					goto digitize
				`	"I'll try."`
			`	"Funny," Ivan says with a blank expression.`
			label digitize
			`	"Let me just get these folders digitized for you, then I can hand you a data chip with everything on it. It'll only be a few minutes."`
			action
				set "remnant: got deep anomaly research"
			`	Ivan leaves the room with all the folders, and when he returns, he hands you a data chip before shoving all the folders back into the filing cabinet. "Well, anything else you need?"`
			`	"No. That's all I was here for," you respond. "Good luck on the rest of your work."`
			`	"Thank you," Ivan says. "We might be in touch in the future. I might need your help again for this project, hopefully during a less dire situation than last time."`
				decline
			
			label "retrieved before"
			`	You return to the office complex where Ivan's office is and ask the receptionist if Ivan is available, and he looks at you with confusion.`
				goto moved
			
			label gone
			`	You ask a receptionist what Ivan's room number is, and he looks at you with confusion.`
			
			label moved
			`	"Ivan Haataja? He moved out weeks ago. Said something about 'moving up in this world' while dragging a pallet of filing cabinets out of the building. I can look up where he is now if you need me to."`
			`	"I'd appreciate that," you say.`
			`	The receptionist spends a few minutes tapping away at a keyboard. "Looks like he had his office moved to... the Deep Polytechnic Institute of Valhalla?" he says with a surprised look. "Oh wow, must have gotten someone's attention in the government to be moved there. Do you need directions?"`
			`	You get directions from the receptionist and thank him for his time. Turns out this Institute is in the heart of the university district of the spaceport city. Several planets in the Deep, Paradise Worlds, and even many near Earth have a similar university district, but the one on Valhalla is the largest of its kind in the entire Republic.`
			`	As you enter the district, you note that the architecture here is much more appealing than the brutalistic architecture of Ivan's old office building. The buildings consist of more curves than right angles with a textured metallic surface that scatters the sunlight to give the area a warm glow, as opposed to directing it right into your eyes if you happen to be standing in the wrong spot. Even among all the metallic buildings, there is still a good amount of greenery: well-trimmed bushes and trees line the streets, and many of the buildings are topped with gardens.`
			`	You ascend the stairs of the Institute, the massive building looming over you as you approach. Its more ancient design makes the building stand out from the rest of the district, the entrance being guarded by massive marble pillars that manage to not clash with the metallic sheen of the rest of the buildings. The interior is similarly impressive, with a massive lobby area centered by an impressive water fountain.`
			`	You approach one of the receptionist desks and ask to see Ivan Haataja. "It looks like he's available right now," she says. "We'll let him know you're coming and have someone here to escort you to Doctor Haataja's office shortly."`
			`	You're escorted through what seems like endless hallways and stairwells, the entire building being as impressively decorated as the lobby, before finally coming to Ivan's office. You thank the escort for bringing you here (as you would have been lost for hours without him, surely why they have people just for escorting guests) and knock on Ivan's door.`
			`	Ivan opens the door with a big smile on his face. "Captain <last>! So great to see you here. Please, have a seat." Ivan ushers you inside his office, an impressively large room with a window wall overseeing a beautiful courtyard. You sit down in a cushioned chair on the opposite side of a desk. You lean back into the chair and get comfortable. "I know the chairs are cozy," Ivan says. "Don't fall asleep on me though."`
			branch second
				"retrieved information" == 2
			`	Ivan then takes a seat in his own cushioned chair. "Welcome to my office. This is miles above what I'm used to. After gaining the attention of the Deep government with the discoveries we were making, they immediately had my office moved from the dingy complex it used to be at to here. I have you to thank for much of that work.`
				goto reason
			
			label second
			`	Ivan then takes a seat in his own cushioned chair. "Welcome to my office. Much better than the old place, isn't it? After gaining the attention of the Deep government with the discoveries we were making, they immediately had my office moved from that dingy complex to here. I have you to thank for much of that work.`
			
			label reason
			`	"So. What brings you here, Captain?" he asks.`
			branch remnant
				has "deep: did reveal remnant"
			choice
				`	"I was wondering what your research on the wormholes and alien creatures has brought up."`
				`	"Could I get a copy of your research on the wormholes and alien creatures?"`
					goto "sprites copy"
			`	"Ah. Well, there's quite a bit to talk about." Ivan reclines his chair.`
			`	"As far as the wormholes go, we're still trying to theorize how the wormholes in this region of space work. A wormhole in the classical sense is some aberration in the fabric of space that allows for instantaneous movement between two points. You can think of it like a tunnel, where you can go one way or the other. But how then does the loop of wormholes that you discovered work? Four different wormholes creating a loop where travel is unidirectional." Ivan turns his chair and glances out at the courtyard. "We aren't yet sure how they could be functioning like this. Anything we come up with seems to violate some law of physics that we're certain is true."`
			`	Ivan turns back to you. "As for those alien creatures, they're similarly complexing. Humanity has found life on other worlds before, but it has always conformed to our ideas of what life is given our experience on Earth centuries ago. But these creatures are something else entirely. There are no terrestrial planets in the system you found them in suitable for life, so they must have evolved on the gas giants in the system. How life can even begin in such an environment, let alone evolve to be able to travel the vacuum of space, is a mystery to us.`
			`	"By the way, do you want to take the honors of naming these creatures? My team has some ideas, but we're not particularly convinced by any of them, so I thought I'd ask you."`
			choice
				`	"How about 'void sprites'?"`
					goto sprites
				`	"How about 'Floaty McFloat Face'?"`
					goto joke
				`	"Sorry, I don't have any ideas."`
			
			`	"That's unfortunate," Ivan says. "I've been thinking of a name that references the void of space. I'll come up with something eventually."`
				goto ask
			
			label joke
			`	"In a joking mood, I see. We're not naming them 'Floaty McFloat Face,'" Ivan says with a blank expression. "I've been thinking of something in relation to the void of space. I'll come up with something eventually."`
				goto ask
			
			label sprites
			action
				set "deep: named void sprites"
			`	"Void sprites," Ivan says slowly, as if letting the name sit on his tongue. "Void sprites... I like it."`
			
			label ask
			`	"Do you think I could get a copy of your research?" you ask.`
			label "sprites copy"
			branch again
				"retrieved information" == 2
			
			`	"A copy?" Ivan looks off into space for a moment. "Well, I suppose since you helped me so much, I could make an exception for you. I typically don't share findings with those not on my research team until they're finalized. I've been burned one too many times because of that."`
			`	Ivan leans over to his desk. "This will be for your eyes only."`
				goto next
			
			label again
			`	"Again?" Ivan asks. He leans over to his desk. "I like that you're so interested in my research. I suppose it only makes sense with you helping me, but typically merchant captains aren't this interested in following up on odd jobs they do."`
			
			label next
			action
				set "remnant: got deep wormhole and sprite research"
			`	He presses a button on the desk. "Abigail, could you please make a copy of the encrypted folders 'TAB-RP,' 'WLT-RP', and 'GGA-RP' on the Institute network under my name and bring them to my office in a data chip? Thank you."`
				goto reencrypt
			
			label remnant
			action
				"ivan's suspicion" = ( "retrieved information" / 2 * "deep: knew of stones before scientists" ) + "deep: knew of stones before scientists" + 2 * "Deep: Remnant: Engines: declined" + 2 * "Deep: Remnant: Engines: failed" + "Deep: Remnant Surveillance: declined" + "Deep: Remnant Surveillance: failed"
			
			branch technology
				has "remnant: told that deep has technology"
			
			branch surveillance
				has "remnant: told about surveillance"
			
			choice
				`	"I was wondering what your research on those Remnant ship scans has brought up."`
				`	"Could I get a copy of your research on those Remnant ship scans?"`
					goto suspicion
			branch cubes
				has "Deep: Remnant Surveillance: done"
			`	"Ah. Well, there's quite a bit to talk about." Ivan reclines his chair.`
			`	"The ship scans look like nothing we've ever seen before. The ships seem to have a sort of... organic property to them. Here, let me show you." Ivan pulls up a schematic on his computer of the Remnant ships that you scanned. You're somewhat surprised that he could pull so much information from an outfit scan. "The ships look relatively normal for the most part, but their hulls have an almost organic structure to them." He zooms in on a section of the schematic that highlights the hull structure. "Now, when it comes to ships designed by, say, Betelgeuse, or even the Navy, the hull supports are arranged in triangular or square sections. But these ships have a pseudo-hexagonal design to them, completely non-uniform. It almost looks like the cell structure of some plants.`
			`	"Aside from the strange hull structure, they also seem to have a considerable amount of equipment integrated directly into the ships themselves. Built-in scanners and ramscoops, for example. Stuff that didn't come up on the surface of the outfit scan but that we can tell is there. The smaller of the two ships you scanned also has some sort of built-in device that we can't make any sense of. It doesn't look like any sort of device that we've seen before, but it takes up a considerable portion of the ship's structure, so it must have some purpose. We'd need to get a closer look to figure out what it is."`
			`	"Do you think I could get a copy of your research?" you ask.`
				goto suspicion
			
			label technology
			choice
				`	"I was wondering what your research on Remnant technology has brought up."`
				`	"Could I get a copy of your research on Remnant technology?"`
					goto suspicion
			branch cubes
				has "Deep: Remnant Surveillance: done"
			`	"Ah. Well, there's quite a bit to talk about." Ivan reclines his chair.`
			`	Ivan pulls out a schematic showing the engines you brought. "The engines you brought us are very interesting. We already mentioned to you how they're rather powerful for their size, more so than even atomic engines of a similar size, while not producing very much heat at all. Their major downside though seems to be the immense amount of energy they draw. The energy drain is not surprising given that they seem to be improved ion engines, but the fact that ion engines could ever become more powerful for their size than atomic engines is something spectacular. The thrusters also seem to have the ability to provide reverse thrust, making any ship with them rather maneuverable."`
			
			branch skip
				not "Deep: Remnant: Generators: done"
			`	He pulls out a schematic showing the generator. "The generator on the other hand wasn't all too interesting. Little more than an improved generator of the type you might find down in the Rim. Somewhat interesting that it doesn't produce much energy when compared to something like a fusion reactor given the energy requirement of their engines, but I suppose this people are concerned more with keeping their ships running cool then having excess energy. The one interesting characteristic we discovered though is that the generator seemed to handle the effects of ionization, like something the Hai Ion Cannons apply, much better than normal. It seemed to be an intentional result of how the generator was designed."`
			
			branch skip
				not "Deep: Remnant: Inhibitor Cannon: done"
			`	He then pulls out a schematic showing the weapon. "And finally, the weapon you brought us. The Inhibitor Cannon is quite the technical marvel, having properties we've never seen before. Imagine a Particle Cannon, but half the size and with more range. Two Inhibitor Cannons would take up about the same amount of space as a single Particle Cannon, yet the Inhibitor Cannons would deal more damage. On top of that, the projectiles of the Inhibitor Cannons have the strange ability to slow down any ship they hit. Ships that we tested them on were unable to turn and accelerate at their normal rates."`
			
			label skip
			`	"Do you think I could get a copy of your research?" you ask.`
			
			label suspicion
			branch cubes
				has "Deep: Remnant Surveillance: done"
			branch again2
				"retrieved information" == 2
			
			`	"A copy?" Ivan looks off into space for a moment. "Well, I suppose since you helped me so much, I could make an exception for you. I typically don't share findings with those not on my research team until they're finalized. I've been burned one too many times because of that."`
			`	Ivan leans over to his desk. "This will be for your eyes only."`
				goto branches
			
			label again2
			`	"Again?" Ivan asks. He leans over to his desk. "I like that you're so interested in my research. I suppose it only makes sense with you helping me, but typically merchant captains aren't this interested in following up on odd jobs they do."`
			
			label branches
			branch one
				"ivan's suspicion" == 1
			
			branch two
				"ivan's suspicion" == 2
			
			branch three
				"ivan's suspicion" == 3
			
			branch four
				"ivan's suspicion" == 4
			
			label one
			action
				set "remnant: got deep research"
			`	He presses a button on the desk. "Abigail, could you please make a copy of the encrypted folders 'TAB-RP' and 'RTS-RP' on the Institute network under my name and bring them to my office in a data chip? Thank you."`
				goto reencrypt
			
			label two
			action
				set "remnant: got deep research"
			`	He hesitates for a moment before pressing a button on the desk. "Abigail, could you please make a copy of the encrypted folders 'TAB-RP' and 'RTS-RP' on the Institute network under my name and bring them to my office in a data chip? Thank you.`
			`	"So, not handing this off to anyone, are we?" he asks you.`
			choice
				`	"Of course not."`
					goto course
				`	"No. Why do you ask?"`
			`	"Just curious," he responds.`
				goto reencrypt
			label course
			`	"Good," he responds.`
				goto reencrypt
			
			label three
			action
				set "remnant: got old deep research"
			`	He hesitates for a moment, looks up at you, then presses a button on the desk while still looking into your eyes. "Abigail, could you please make a copy of the encrypted folders... 'TAI-RP' on the Institute network under my name and bring them to my office in a data chip? Thank you."`
			`	"So, you said you knew of the Remnant before working with me, right?" he asks you.`
			choice
				`	"Yeah. Why do you ask?"`
				`	"Not that I recall."`
					goto recall
			`	"Just curious. Do you care to tell me what your relationship with them is like?"`
				goto relationship
			label recall
			`	"Well I seem to recall that being what you told me. Do you care to tell me what your relationship with them is like?"`
			label relationship
			choice
				`	"I just do odd jobs for them. Nothing official."`
				`	"I'd rather not disclose that."`
			`	"Interesting," he says.`
				goto reencrypt
			
			label four
			action
				set "remnant: got no deep research"
			`	He is about to press a button on his desk, then pulls away from it and turns his chair toward the courtyard. "Never mind. I can't give you a copy. That research is classified."`
			choice
				`	"Okay. I'll just head out then."`
					goto leave
				`	"But I helped you with it. I really can't see it?"`
			
			`	"No, you can't see it. Is there a problem with that?"`
			choice
				`	"Yes. I need that research."`
				`	"No, there's no problem. I'll just see myself out."`
					goto leave
			
			`	He turns his chair back to you and stands up. "News flash, pal. I'm on to you. You asked for the research I had back before we had entered the wormhole in Terminus, and then you later told me that you'd already been through there and met these Remnant. Then when I asked you to help me learn more about them, you said no. I think you're covering for them in some way and giving them information on what I know. Why you're doing that, I don't know, but that's what my gut says, and I've learned to trust my gut on feelings like these. Now get out of my office."`
			choice
				`	"You've got me. I'll leave."`
					goto out
				`	"You have it all wrong, Ivan."`
			`	"I said get out of my office. Or do I need to call security?" Ivan hovers his finger over the button on the desk.`
			choice
				`	"Okay, okay. I'll leave."`
					goto out
				`	"I think you do need to call security. I'm not leaving without that research."`
			`	Ivan presses down on the button. "Security. I have a guest in my office who is no longer welcome."`
			`	Not even thirty seconds later, a group of security guards enter the office. "<first> <last>, you're going to need to come with us," one of them says.`
			choice
				`	"Okay, okay. I'll leave."`
					goto escorted
				`	"I don't think so."`
					goto resist
			
			label resist
			`	"Well I think so," the security guard quips back, pulling a taser from his holster. The other security guards equip various equipment of their own, some of it looking lethal. "I'm going to give you one more chance to leave."`
			choice
				`	"Okay, okay. I'll leave."`
					goto escorted
				`	"Well you're going to need to make me leave."`
			
			`	Before you can even finish your sentence, you can already feel your muscles tensing up from the taser. You collapse, hitting your head on Ivan's desk as you go down. Before you lose consciousness from the impact, you hear Ivan yell, "Come on! Now I'm going to need to get a new desk."`
			`	You eventually wake up in a cell with handcuffs on. You look around and see a security guard looking at you from outside of the cell. "Ah, you're finally awake." The guard opens the cell. "Doctor Haataja says he isn't going to be pressing charges. Right this way, please."`
			`	The guard escorts you out of the cell, which was inside the security office of the Institute near the lobby. You get some puzzled looks from those in the lobby as you're escorted by the security guard in cuffs. After bringing you outside, the guard unlocks the cuffs. "Don't cause any more trouble, now," he says.`
				decline
			
			label escorted
			`	The security guards escort you out of Ivan's office, and then out of the building. Looks like the Remnant won't be getting what they were hoping for.`
				decline
				
			label out
			`	You back out of Ivan's office with him looking at you the entire time. Looks like the Remnant won't be getting what they were hoping for.`
				decline
			
			label leave
			`	Ivan smiles, but it looks forced. "Come back any time you want. You're free to roam the Institute whenever you desire. Most of the building is closed to the public, but I can always mark you as my guest whenever you're interested in looking around."`
				decline
			
			label cubes
			`	Ivan laughs as he reclines his chair. "Screw that. You should see what I've been able to recover from those sensor cubes you placed.`
				goto ramble
			
			label surveillance
			choice
				`	"I was wondering what came of those sensor cubes I placed."`
				`	"Could I get a copy of what you've found from those sensor cubes?"`
					goto "surveillance copy"
			`	Ivan laughs as he reclines his chair. "Oh, it's absolutely fascinating what I've been able to find.`
			label ramble
			`	"With a cube in each of the Remnant systems, I was able to track all their fleet movements, and I've discovered some interesting things. For one, ships either make trips between the three systems, or they leave the cluster entirely for significant amounts of time, often at least a month at a time. There weren't very many ships or fleets that took short trips out of the cluster, say only one or two weeks in length. Seems like they're sending people on rather lengthy missions.`
			`	"Aside from fleet movements, the number of ships was of note. The cubes track the number of unique ships seen, and they rarely tracked the same ship more than a handful of times. The Remnant seem to have an incredible number of ships, more than perhaps Deep Security and the Navy combined. Certainly impressive for a group consisting of only three star systems. The cubes are also able to make low quality scans of any ships in the system. While those individual scans are less than what an outfit scan provides, given enough scans you're able to get a clearer picture. These ship scan results were... interesting, though. There seemed to be very few ships like the ones you scanned. Perhaps those were their most advanced ships, but the rest of what I was able to see didn't seem more powerful than your average merchant ship."`
			`	"I actually lost connection to the cubes a few weeks ago now, but I'd gathered enough information already."`
			`	"Do you think I could get a copy of your research?" you ask.`
			label "surveillance copy"
			`	"A copy? Of course! Of course! You're the reason I have any of this information in the first place, so you have every right to it." Ivan presses a button on his desk. "Abigail, could you please make a copy of everything on the Institute network under my name and bring them to my office in a data chip? Thank you."`
			action
				set "remnant: got all deep research"
				
			label reencrypt
			`	Only a few minutes later there is a knock at the door. Ivan retrieves the data chip from the person who brought it, then plugs it into a computer on his desk. "Let me reencrypt these then leave the new key in the chip for you. Leaving the key right next to the lock isn't exactly the most secure thing to do, but I take it you'll be smart enough to remedy that whenever you use this. Aaaand... done." He pulls the chip from his computer and hands it to you.`
			`	"Anything else?" he asks.`
			`	"No. That's all I was here for," you respond. "Good luck on the rest of your work."`
			`	"Thank you," Ivan says. "Come back any time you want. You're free to roam the Institute whenever you desire. Most of the building is closed to the public, but I can always mark you as my guest whenever you're interested in looking around."`
				decline
			
	on complete
		payment 1000000
		conversation
			`	When you return to <origin>, you approach the information desk that Torza told you to go to. You tell the person at the desk that you're here to meet Torza. They have you wait on a bench nearby, and Torza arrives some time later. "Hello, Captain. I take it you have a copy of the findings."`
			
			branch terminus
				"retrieved information" == 1
				has "remnant: got deep anomaly research"
			
			branch sprites
				has "remnant: got deep wormhole and sprite research"
			
			branch everything
				has "remnant: got all deep research"
			
			branch research
				has "remnant: got deep research"
			
			branch old
				"retrieved information" == 1
				has "remnant: got old research"
			
			branch repeat
				"retrieved information" == 2
				has "remnant: got old research"
			
			branch nothing
				has "remnant: got no deep research"
			
			label terminus
			`	You hand Torza the data chip that Ivan gave you. Torza takes it and plugs it into a terminal behind the desk. He appears to read through the research rather quickly, nodding and scratching his chin at various points. "Interesting research they have done," he says. "So they understand that it is a wormhole, but still have no means of passing through to the other side." Torza removes the data chip from the terminal and pockets it. "We will keep hold of this information. For the time being we have little to fear, but I ask that you inform us if they make any further progress. May the Embers burn bright for you."`
				decline
			
			label sprites
			`	You hand Torza the data chip that Ivan gave you. Torza takes it and plugs it into a terminal behind the desk. He appears to read through the research rather quickly, nodding and scratching his chin at various points. "They seem to have taken a liking to the void sprites," he says. "It is human nature to be curious, and they will be kept curious by the void sprites for a while. This buys us time." Torza removes the data chip from the terminal and pockets it. "We will keep hold of this information, and keep an eye on the Threshold in case they decide to venture further into the Ember Waste. Should that occur, we will call on you. May the Embers burn bright for you."`
				decline
			
			label everything
			`	You hand Torza the data chip that Ivan gave you. Torza takes it and plugs it into a terminal behind the desk. He appears to read through the research rather quickly, nodding and scratching his chin at various points. "Impressive that you've brought us so much," he says. "This appears to be absolutely everything they know about us. While not ideal, at the very least we now know what they know and can use that to our advantage." Torza removes the data chip from the terminal and pockets it. He then pulls out what you recognize as the sensor cubes you placed on the Remnant worlds and puts them on the table. "We disabled these some time ago, but not before feeding them some junk data. And judging by this information, it worked. We will keep hold of this information, and keep an eye on the Threshold in case they decide to venture into the Ember Waste. Should that occur, we will call on you. May the Embers burn bright for you."`
				decline
			
			label research
			`	You hand Torza the data chip that Ivan gave you. Torza takes it and plugs it into a terminal behind the desk. He appears to read through the research rather quickly, nodding and scratching his chin at various points. "So, they know of some, but not all, of our technological capabilities," he says. "We can use this fog of war to our advantage, should we need to." Torza removes the data chip from the terminal and pockets it. "We will keep hold of this information, and keep an eye on the Threshold in case they decide to venture further into the Ember Waste. Should that occur, we will call on you. May the Embers burn bright for you."`
				decline
			
			label old
			`	You hand Torza the data chip that Ivan gave you. Torza takes it and plugs it into a terminal behind the desk. He appears to read through the research rather quickly with a puzzled look on his face. "There is nothing here like what you mentioned that the Deep knows. Are you sure you received the correct information?"`
				goto tricked
			
			label repeat
			`	You hand Torza the data chip that Ivan gave you. Torza takes it and plugs it into a terminal behind the desk. He appears to read through the research rather quickly with a puzzled look on his face. "This is the same information as what you brought us last time. Are you sure you received the correct information?"`
			
			label tricked
			`	Torza turns the terminal to face you. You read through it and see that all the data is on the wormhole in Terminus, but it says that they are still looking for a way to pass through it. "This isn't what I asked for," you say. "He must have purposefully given me the wrong information."`
			`	"Then he understands why you asked for it," he responds as he turns the terminal back and pockets the data chip.`
				goto disappointing
			
			label nothing
			`	"No," you respond. "The lead scientist guessed correctly that I was asking for his research to give to you."`
			
			label disappointing
			`	Torza scratches his chin. "This is... disappointing. You've helped to place us in a scenario where a potential adversary knows much about us, but we know little about them." Torza stares at you, but doesn't appear to be angry. "Perhaps espionage is in order. But given your connections to the Deep, we will pursue such actions on our own. Should something arise in the future where we need you, we'll contact you. Until then, do not compromise our position any further. We will not take it so lightly a second time."`
				decline



mission "Remnant: Tech Retrieval"
	name "Remnant Human Tech Retrieval"
	description "The Remnant are interested in learning what advances humanity has made over the past centuries. Bring them samples of advanced technology, such as newly developed ramscoops, weapons, or shields."
	source "Viminal"
	to offer
		has "Remnant: Technology Available: offered"
		random < 30
	on offer
		"remnant met taely" ++
		conversation
			`As you enter the spaceport, you notice someone across the plaza appears to have been waiting for you. A tall, solidly built woman in short-sleeved coveralls stands up from where she was sitting near the information desk. With a few quick gestures at the person behind the counter, she heads towards you with a confident stride. As she approaches, you note that the crowds of people moving around the plaza seem to be staying out of her way as if she were someone important. In contrast, she reminds you of the mechanics who maintained the textile factories back on New Boston. In particular, the tools at her belt and the wear marks on her clothing suggest someone who is more comfortable inside a ship access duct than behind a desk.`
			`	Before you can decide if you want to avoid this person or not, she is standing in front of you, clearing her throat. "You are captain <first> <last> of the <ship>?" She asks in a lyrical chant.`
			choice
				`	"That's me."`
					goto admit
				`	"I don't know who that is."`
			`	She looks at you with an inscrutable expression for a moment. "Trying to be inconspicuous is admirable. Being oblivious to the fact that you stand out like a star in empty space is not."`
			label admit
			`	"I have an opportunity for you, if you are interested in being helpful to the Remnant." When you express your interest she leads you over to a balcony overlooking the primary shipyards. As she leans on the railing a cold breeze makes you shiver, but she seems oblivious to it. "I am known as Taely. As a prefect among the Remnant, I am responsible for this." She gestures at the shipyards, where you can see a myriad of the Remnant's alien-looking ships in various stages of construction or repair. "The ships we have serve us well, but they are old designs. Only the Ibis is comparatively new. We need new ideas, new inspiration." She pauses, focusing briefly on a small bay where several people appear to be pulling what looks like a supercapacitor out of a Puffin.`
			choice
				`	"So, what are you asking?"`
					goto request
				`	"What are they doing?"`
			`	"Oh, those are apprentices," she trills with a touch of amusement. "They need to learn how to handle unusual tech. One of the first steps is to deal with old tech. Like salvaging an obsolete supercapacitor out of that Puffin so it can be reprocessed into something useful, and replacing it with newer integrated energy storage." She glances at you in amusement. "You've flown the Puffin, you know how old that ship is: primitive energy systems, antique 'hard-shell' shields that have to be manually raised and lowered..." She trails off into momentary silence. "Be glad that you got one that had already been refurbished prior to your visit to Nenia. At least it had modern engines and an updated sensor array."`
			label request
			`	"To the point," her tone shifts to a more martial cadence. "We want to know how humanity has advanced in the past five and a half centuries. If you found us, I am sure it is only a matter of time until the Alphas, their servants, or others intent on galactic domination discover us. We need to know what sort of weapons they will be wielding, how their ships will be protected, and how fast they can travel in deep space."`
			choice
				`	"Okay, I will see what I can find."`
					goto find
				`	"Could you elaborate on 'how fast they can travel in deep space'?"`
				`	"No, I don't want to get involved in this."`
					goto nothelp
			`	She considers her thoughts briefly, then chants, "How fast a ship can move through an area of deep space basically depends on how fast they can collect fuel. Ramscoops were common at the time of the exodus, and if humanity has developed better ramscoops or other means of generating fuel, these would significantly improve their speed at exploring or crossing large volumes of space."`
			choice
				`	"Okay, I will see what I can find."`
				`	"No, I don't want to get involved in this."`
					goto nothelp
			label find
			`	Taely nods "I will look forward to seeing what you find. In the meantime, I should get back to work." With that, she swings over the railing and climbs quickly down the wall in the direction of the shipyard, seemingly unconcerned about the height.`
				accept
			label nothelp
			`	Taely looks at you with a blank expression, then chants in a monotone voice "If that is your choice, you are unlikely to find much of interest to do among us." With that, she vaults over the edge of the railing and drops from view. As you quickly peer over the railing, you discover that she had must have caught a handhold somehow, as she is rapidly moving down the wall in a controlled fashion with ease of a spider.`
				decline
	to complete
		or
			has "Remnant: Heavy Laser: done"
			has "Remnant: Catalytic Ramscoop: done"
			has "Remnant: Plasma Cannon: done"
			has "Remnant: Electron Beam: done"
			has "Remnant: D94-YV Shield Generator: done"
			has "Remnant: S-970 Regenerator: done"



mission "Remnant: Heavy Laser"
	name "Retrieve Heavy Lasers"
	description "A Remnant engineer has asked you for a delivery of two Heavy Lasers to <planet> for them to study."
	source "Viminal"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not distance 0
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Heavy Laser"
		conversation
			`You remember that Taely was interested in seeing examples of technology from human space. Would you like to show her your Heavy Laser?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely just finishing the installation of a Thrasher Cannon in a Starling. "Greetings, <first>. I will be down in a minute." She does a few more things inside a panel, reseals the hatch, and slides down a fin to land next to you. "So, do you have something for me?"`
				goto next
			label familiar
			`	You recall that Taely is responsible for the shipyards, so you head straight there and ask the nearest mechanic. They direct you to a large hangar tucked into a cliff face, where you find her working at a terminal filled with schematics. Behind her, the room fades quickly into darkness where you can faintly make out what appears to be a large tank and a lot of whirring machinery. As you approach she looks up from her work and turns to face you. "Ah, you have returned. Do you have something new for me?"`
			label next
			`	You lead her back to your ship, where you show her the Heavy Laser. "A laser cannon?" she asks. "Our records indicate that humanity had primitive laser technology at the time of the Exodus, but nothing that would be considered useful as weapons." She pauses to look down at her scanner. "And yet my scans indicate that they are capable of significant power output." She pauses for a moment before continuing, "These could be quite useful to examine more thoroughly. Please deliver two of these Heavy Lasers to a research team on <planet>."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two Heavy Lasers that Taely requested. Go buy two Heavy Lasers before returning.`
	on complete
		outfit "Heavy Laser" -2
		payment 870000
		"remnant met taely" ++
		conversation
			`As you land on a pad adjacent to the research center, a group of researchers mount some kind of weapon on a platform aimed down a firing range. The researchers retreat behind a thick barrier and press a button to activate the weapon. A flash of light erupts from the muzzle as the target downrange is cut in half. The barrel of the weapon raises into the air, and the researchers rush out onto the range with tools and devices to inspect the damage.`
			`	Noticing your arrival, one of the researchers veers off and heads towards you. "So, you are the one with the samples of humanity's laser weapons?" chants the researcher. "Always interesting to see new things." He turns and waves at a Remnant standing near the edge of the landing pad with a camel hitched to a wagon.`
			`	The researchers quickly unload the Heavy Lasers from your ship, and hand you a credstick with <payment>. "Thank you for bringing us something new to examine. We appreciate the breath of fresh air." With that, they quickly head off into a nearby lab, escorting their cargo of weaponry on the oddly archaic transportation.`



mission "Remnant: Plasma Cannon"
	name "Retrieve Plasma Cannons"
	description "A Remnant engineer has offered you a reward in exchange for delivering two Plasma Cannons to a team on <planet>."
	source "Viminal"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not distance 0
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Plasma Cannon"
		conversation
			`You recall that Taely was interested in examining examples of technology from ancestral space. Would you like to show her the Plasma Cannons you retrieved?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely just finishing the installation of a Thrasher Cannon in a Starling. "Greetings, <first>. I will be down in a minute." She does a few more things inside a panel, reseals the hatch, and slides down a fin to land next to you. "So, do you have something for me?"`
				goto next
			label familiar
			`	Aware that Taely's main area of responsibility is in the shipyards, you head straight there and have almost arrived when you are approached by another Remnant who introduces herself as one of Taely's aides. "Greetings, Captain" she trills. "Our scans picked up indications of uncatalogued human weaponry. Were you bringing it to show us?"`
			label next
			`	You lead her back to your ship, where you show her the Plasma Cannon. "I have never seen weapons designed to handle such a high heat output! Is this some kind of plasma based weapon?" she asks, gesturing at a cannon. You nod, and she continues, "Intriguing. We have noticed that the Korath ships seem to run particularly hot, and have speculated that overheating them might be an effective means of disabling them. I would enjoy researching these a bit more. If you could deliver two to <planet> for us you would be well compensated."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two Plasma Cannons that Taely requested. Go buy two Plasma Cannons before returning.`
	on complete
		outfit "Plasma Cannon" -2
		payment 1130000
		"remnant met taely" ++
		conversation
			`As the <ship> settles onto the pad closest to the research facility, you can see a weapons specialist checking over a large cannon on a platform beneath a nearby Albatross. When he sees you starting to unload the two Plasma Cannons, he snaps the casing closed and gestures to someone out of sight. Within moments both him and an empty flatbed are there to pick up the weapons.`
			`	"Thank you for your help," he says. "Our Inhibitors provide us with something of a mobility advantage against the Korath, but they aren't particularly effective at disabling them. These Plasma Cannons will open new avenues of research for us." He pauses, then continues. "I also included a bonus for you. It is a 'finder's fee,' as we always appreciate new tech."`
			branch wave
				has "Remnant: Learn Sign 1: done"
			`	The weapons technician finishes strapping down the Plasma Cannons and makes a gesture towards you, then heads off toward the lab.`
				goto end
			label wave
			`	The weapons technician finishes strapping down the Plasma Cannons and makes a gesture that you recognize as "farewell," then heads off toward the lab.`
			label end
			`	As you watch the Remnant heading off with their new weapons to study, you cannot help but wonder what will be the result of it.`



mission "Remnant: Catalytic Ramscoop"
	name "Retrieve Catalytic Ramscoops"
	description "A Remnant engineer has offered you <payment> for delivering two Catalytic Ramscoops to a lab on <planet>."
	source "Viminal"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not distance 0
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Catalytic Ramscoop"
		conversation
			`You recall that Taely was interested in seeing examples of new human technology, and the Catalytic Ramscoop definitely fits the criteria. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely calibrating an Inhibitor Cannon on an Albatross. "Greetings, <first>. I am just finishing these calibrations." She does a few more things inside the casing, reseals the hatch, and drops to the ground on a tether. "So, did you recover something?"`
				goto next
			label familiar
			`	Remembering that she spends most of her time in the shipyard, you head straight there and almost immediately are intercepted by another Remnant who introduces herself as one of Taely's assistants. "Good day, Captain" she chants. "Our scans picked up a new form of ramscoop onboard your ship. Have you brought it for us to look at?"`
			label next
			`	You lead her back to your ship, where you show her the Catalytic Ramscoop. "Interesting. This is a new design?" She asks, gesturing at the ramscoop. You nod, and she continues, "Even if it does not perform well, new perspectives on the problem could be valuable. There is a research team on <planet> that is currently working on new ramscoop designs. If you could deliver two Catalytic Ramscoops to them we could offer you <payment>."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two Catalytic Ramscoops that Taely requested. Go buy two Catalytic Ramscoops before returning.`
	on complete
		outfit "Catalytic Ramscoop" -2
		payment 1390000
		"remnant met taely" ++
		conversation
			`As the <ship> settles onto the pad closest to the research laboratory, you can see several people exiting an adjacent hangar with a trailer pulled by a camel. They quickly approach your landing pad and wait for you to complete your shutdown routines before boarding and starting to unload the ramscoops. Once they are done one of them comes up to you and hands you your payment of <payment>. "Thank you for the delivery, Captain. We are looking forward to seeing what they have done differently."`



mission "Remnant: Electron Beam"
	name "Retrieve Electron Beams for the Remnant"
	description "A Remnant engineer has offered you a reward for delivering two electron beams to a testing range on <planet>."
	source "Viminal"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not distance 0
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Electron Beam"
		conversation
			`You recall that Taely was interested in seeing examples of new human technology, and the electron beam certainly fits the criteria. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely closing up the panel on a Thrasher Turret. "Greetings, <first>. You have good timing: I was just finishing." She reseals the hatch, and drops to the ground on a tether. "So, did you recover something?"`
				goto next
			label familiar
			`	Given what you know about Taely, you decide to skip the spaceport proper and head for the shipyard. After a frustrating half hour spent wandering around trying to find her, you finally encounter a helpful weapons tech who says they can check the weapon on Taely's behalf.`
			label next
			`	You accompany her back to your ship, where she examines the electron beam. "This could be useful. Focusing energy into continuous beams has been a popular idea for centuries. It is very useful to know that they have finally managed to make it into an effective weapon. If you could deliver two electron beams to one of our testing ranges on <planet> you would be well compensated."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two electron beams that Taely requested. Go buy two electron beams before returning.`
	on complete
		outfit "Electron Beam" -2
		payment 1090000
		"remnant met taely" ++
		conversation
			`On <planet> you follow the landing instructions to arrive at a pad set next to a small complex of testing ranges and workshops. A group of technicians is just finishing the disassembly of a weapon from the test stand when you settle onto the stand, and a few minutes later they arrive to unload the electron beams from your ship. They move eagerly to secure the new weapons to their flatbed and quickly hand you your payment of <payment> before vanishing into the lab.`



mission "Remnant: D94-YV Shield Generator"
	name "Retrieve D94-YV Shield Generators"
	description "A Remnant engineer has offered you <payment> for delivering two D94-YV Shield Generators to a research facility on <planet>."
	source "Viminal"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not distance 0
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "D94-YV Shield Generator"
		conversation
			`You know that Taely was interested in seeing examples of recently developed human technology, and the D94-YV Shield Generator probably fits the criteria. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely applying some kind of material over a hole in a hull. "Greetings, <first>. What brings you here today?" She reseals the hatch, and drops to the ground on a tether. "Did you bring us something?"`
				goto next
			label familiar
			`	You decide that you are more likely to find her in the shipyard, so you skip the starport and head out among the ships. As you search through the yard you are soon approached by another engineer. "Well met, Captain. Taely said you may be bringing back samples of new technology from ancestral space. Do you have something to show us?"`
			label next
			`	You nod in the affirmative and lead her back to your ship, where she examines the D94-YV Shield Generator. "It certainly looks impressive," she chants as she paces around the massive piece of equipment. "It will be valuable to see what our enemies might be shielded with, and maybe something we can learn from it too." She comes to a stop in front of you. "If you could deliver two of these to a lab on <planet> we could compensate you with <payment>."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two D94-YV Shield Generators that Taely requested. Go buy the two shield generators before returning.`
	on complete
		outfit "D94-YV Shield Generator" -2
		payment 1150000
		"remnant met taely" ++
		conversation
			`On <planet> you follow the landing instructions to arrive at a pad set next to a large warehouse. As you complete your shutdown routine the doors slide open and a large crawler emerges, accompanied by several Remnant. They carefully unload the D94-YV Shield Generators and strap them down. As they start heading back to the warehouse one of them comes over to hand you <payment>. "Thank you for the delivery. Our team is eager to see what humanity has achieved in these past centuries."`



mission "Remnant: S-970 Regenerator"
	name "Retrieve S-970 Regenerators"
	description "A Remnant engineer has offered you <payment> for delivering two S-970 Regenerators to an impact testing facility on <planet>."
	source "Viminal"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not distance 0
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "S-970 Regenerator"
		conversation
			`You recall that Taely was interested in seeing instances of new human technology, and the S-970 Regenerator is definitely a recent development. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely adjusting something on the hull that you can't quite see. "Greetings, <first>. What brings you here today?" She taps something, then hangs her tools on her belt and drops to the ground on a tether. "Did you bring us something?"`
				goto next
			label familiar
			`	Taely seems like the sort of person who spends most of their time working directly on ships, so finding people repairing ships seems the most likely place to find her. As you enter the maintenance section, you spot an engineer waiting for you. She quickly introduces herself as an engineer who works with Taely. "She was not able to be here, so she sent me to see what you have brought" chants the engineer.`
			label next
			`	You nod in the agreement and lead her back to your ship, where she does a cursory scan of the S-970 Regenerator. "Hmm," she murmurs as she peers at the readings on her instrument as she waves it up and down the regenerator. "This looks like they may have found a few techniques that would be beneficial for us to study. If you could deliver two of these to a lab on <planet> we could compensate you with <payment>."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two S-970 Regenerator that Taely requested. Go buy the two shield regenerators before returning.`
	on complete
		outfit "S-970 Regenerator" -2
		payment 2350000
		"remnant met taely" ++
		conversation
			`On <planet> you follow the landing instructions to arrive at a pad set next to a substantial facility with a large equipment bay. As you complete your shutdown routine the doors to the bay slide open and a crawler emerges, accompanied by several Remnant. They carefully unload the S-970 Regenerators and strap them down. As they start heading back into the bay, one of them comes over to hand you <payment>. "Thank you for the new outfits to study. Our team is quite interested to see what humanity has achieved since our exodus."`



mission "Remnant: Taely Intro Log"
	invisible
	source
		government "Remnant"
	to offer
		"remnant met taely" >= 1
	on offer
		log "People" "Taely" `As an engineering prefect, Taely is the foremost authority among the Remnant on salvaged technology and a senior leader in their reverse engineering program.`
		fail



mission "Remnant: Chilia Intro Log"
	invisible
	source
		government "Remnant"
	to offer
		"remnant chilia" >= 1
	on offer
		log "People" "Chilia" `As a military prefect, Chilia is responsible for the defense of Remnant space. He can usually be found on the front lines of combat unless required to work on tactics for the Remnant as a whole.`
		fail



mission "Remnant: Chilia Intro Log 2"
	invisible
	source
		government "Remnant"
	to offer
		"remnant chilia" >= 2
	on offer
		log "People" "Chilia" `Despite being quite young, Chilia is highly respected among Remnant society.`
		fail



mission "Remnant: Chilia Intro Log 3"
	invisible
	source
		government "Remnant"
	to offer
		"remnant chilia" >= 3
	on offer
		log "People" "Chilia" `Prefect Chilia is an unusual person compared to most military leaders: He is inclined to do things himself and rarely stands on protocol.`
		fail



mission "Remnant: Return the Samples"
	name "Return the Samples"
	description "A researcher on <planet> has asked you to return void sprite eggs to Nasqueron that the Remnant stole many years ago."
	source "Aventine"
	stopover "Nasqueron"
	to offer
		has "Remnant: Technology Available: offered"
		random < 50
	on offer
		conversation
			`As you are walking through the spaceport, the researcher you previously assisted with the studies on the void sprites approaches you in a hustle. "We have made some new discoveries!" he exclaims in a trill. "Some of the samples that we took all those years ago are actually eggs of some kind. So the Archon must view our previous research as being disruptive to the void sprites' lifecycles.`
			`	"We have been storing these eggs in a cryogenic stasis tank, so they should still be viable and intact. Well, most of them, anyway." His notes trail off on a mournful tone.`
			`	"Could you return some of them to Nasqueron? According to our logs, they were found floating in the lower levels of the atmosphere, where their natural buoyancy should keep them afloat."`
			choice
				`	"Sure, I would be glad to return them."`
				`	"Sorry, I'm really not interested in dodging the Archon again."`
					decline

			`	"Thank you. Since we are continuing to work together, I would like to introduce myself again." He takes a breath, thinks for a second, and speaks a short verse about plumage with a complex chord that sounds at once grandiose and self-deprecating. The best you can make out is that his name is "Plume."`
			`	"Just remember: you will need to use a Puffin to make this delivery. If you don't still have one, there are a few in storage in Viminal." He taps on his commlink, and an assistant emerges from a nearby building with a flatbed truck. Onboard is a large collection of cocoon-like pods cradling large eggs, as well as a big spacesuit that looks more reminiscent of an ancient deep-sea diving suit than anything carried on a modern ship. "Now, remember, you need to remove the eggs from the cocoons and release them gently. Please make sure they don't hit anything on the way out."`
				accept
	npc
		government "Drak (Hostile)"
		system "Nenia"
		personality staying heroic nemesis frugal uninterested
		ship "Archon (Cloaked)" "Lifted Lorax"
	on accept
		log "People" "Plume" `A Remnant researcher specializing in xenobiology, Plume is at the forefront of recent efforts to restart research on the void sprites and a leading expert in non-carbon based lifeforms.`
	on stopover
		conversation
			`Once again you have successfully dodged the Archon to land on Nasqueron. Somehow, knowing it was going to be there was both better and worse than the surprise of the first time.`
			`	As the <ship> sinks through the cloud layers, you gently activate the repulsors to slow your descent to avoid startling the void sprites. A few nearby sprites descend with you, seeming to match your velocity. You slow down as you reach the altitude listed in the log of where the eggs are to be released.`
			`	Setting the ship on autopilot, you walk to the back and struggle into the pressure suit. Readying the eggs in the cargo hold, you equalize pressure in the main cargo hold to the swirling clouds outside, and open the bay doors. As predicted, at this pressure level, the eggs are almost weightless, and are fairly easy to carry to the door of the ship and release.`
			`	By the time you finish releasing the eggs back into the clouds, several void sprites have converged on your ship and appear to be herding the eggs away from you with gentle buffets of their wings. You take a moment to appreciate the alien beauty of these creatures before closing the hatch and purging the ship with fresh air.`
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		conversation
			`Back on the ground, you report on how the release went. The researcher is pleased to hear that the void sprites responded to their presence. "We will give them a few weeks, then try sending another ship to monitor them. Hopefully the Archon will be pacified by this. Meet me in the alien environments lab just off the spaceport if you are interested in pursuing this."`



mission "Remnant: Return the Samples 2"
	name "Return the Samples"
	description "Plume has asked you to return more stolen eggs, this time to Slylandro. Then return to <planet> with footage of the void sprites."
	source "Aventine"
	stopover "Slylandro"
	to offer
		has "Remnant: Return the Samples: done"
	on offer
		conversation
			`Following Plume's directions, you find a lab tucked behind the main area of the spaceport, where a short walkway leads into an underground structure. Stepping inside the door you note a rack of camouflage netting positioned easily at hand. Given what you have learned of their history, it is probably a last-ditch preparation in case they need to hide the entrance from a raid.`
			`	The lab itself is a microcosm of Remnant development. The structure appears to be some strange semi-organic material, and you can see an eclectic mix of familiar and unfamiliar shapes cluttering the tables. If you had to guess, you would say that this lab was the result of several different families of technology, only one of which was human.`
			`	Plume and several other Remnant are at the back of the room inspecting a bunch of cocoon-like containers, similar to the ones that carried the last batch of eggs back to Nasqueron. After checking a screen he looks up and seems momentarily startled to see you.`
			`	"Ah, <first>! You are just in time," Plume chants quickly, his hands unconsciously dancing in a quick series of gestures. "These eggs are ready to be delivered, this time to Slylandro. Could you drop them off like you did before?"`
			choice
				`	"Yes, I would be happy to bring them home."`
				`	"Sorry, I'm really not interested in risking the Archon a third time."`
					decline

			`	"Thank you. Like last time, we can't pay you for this. But we are still hopeful that the Archon might let us resume our studies." He follows you out to the <ship> and helps you load the cocoons holding the eggs. Just before parting ways he asks, "Oh, could you record the void sprites this time? We would like to see the behaviors you mentioned last time."`
				accept
	npc
		government "Drak"
		system "Nenia"
		personality staying heroic nemesis uninterested frugal
		ship "Archon" "Lifted Lorax"
	on stopover
		conversation
			`As you approach Slylandro you watch the Archon like a hawk, but this time it doesn't attempt to drive you off with tridents of white energy. Cautiously you make your way to Slylandro and begin your descent.`
			`	As the <ship> sinks through the cloud layers, you notice the void sprites seem to be tailing you. A few drop past you with startling speed, only to reappear from below as you approach the designated altitude. At the last minute you remember Plume's request to record them, and hit the switch to activate the recorder for the exterior cameras.`
			`	Setting the ship on autopilot, you head back and suit up in the bulky pressure suit once again. Readying the eggs in the cargo hold, you equalize pressure and open the bay doors. As before, the eggs are already floating as you open the cocoons and gently carry them to the door.`
			`	Almost as soon as you release the first egg, a void sprite is there, brushing against the ship to scoop the egg away into the swirling mists. By the time you return with the next one, another sprite is already waiting at the door, undulating in the eerie light. By the time the last egg is released you can see dozens of the strange creatures swarming around the collection of eggs. It occurs to you that very few humans would ever have the chance to see anything like this.`
			`	After taking a moment to enjoy the view, you shut the door as gently as you can, purge the ship with fresh air, and begin the journey back to Aventine.`
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		"reputation: Drak" += 1
		event "remnant: return the samples timer" 2 4
		conversation
			`Back on Aventine, you share the recording of the void sprite's behavior with Plume. "These Sprites demonstrate considerably more communication than we originally thought. And obviously they must have communicated what you did on Nasqueron. Interesting..." Plume's excited staccato exclamations trail off as he begins to make notes on a data pad he has on hand. "Thank you for your help, we will let you know what we find out."`



# Compatibility patch for those who completed Return the Samples 2 before 0.9.11, where it did not have the timer.
mission "Remnant: Return the Samples Compatibility Patch"
	landing
	invisible
	to offer
		has "Remnant: Return the Samples 2: done"
		not "event: remnant: return the samples timer"
	on offer
		event "remnant: return the samples timer" 2
		fail



# "This mission is intended to serve as a notification that one timer has elapsed and how long to wait until the missions start again."
mission "Remnant: Return the Samples 3 Exploration Hint"
	landing
	source "Aventine"
	to offer
		has "event: remnant: return the samples timer"
		or
			and
				not "Remnant: Face to Maw 1: active"
				not "Remnant: Face to Maw 1: done"
				not "Remnant: Face to Maw 1B: active"
				not "Remnant: Face to Maw 1B: done"
				not "Remnant: Face to Maw 2: active"
				not "Remnant: Face to Maw 2B: active"
			or
				has "Remnant: Face to Maw 2: done"
				has "Remnant: Face to Maw 2B: done"
	on offer
		event "remnant: wait for plume" 7 14
		conversation
			`As you disembark from <ship> you almost run into Plume as he strides across the landing area. "Captain <first>, I didn't see you there!" You glance back at the bulk of your ship that you just stepped out of and look at him curiously, wondering how he could have missed seeing a spaceship land in front of him. His chant takes on a slightly apologetic tone. "I've been lost in thought thinking about everything we have discovered lately, especially the most recent recordings you made. I still have a lot to analyze, though." He pauses, looking thoughtful. "That being said, I will probably have more work for you in a week or two."`
			`	Plume asks a few more questions about what you have been doing, then politely excuses himself to continue his research. "Please let me know if you uncover anything else about Nenia!" he trills to you as he departs.`
				decline



conversation "taely cultural data"
	branch return
		has "Remnant: Salvage 1B: done"
	`As you step out into the icy chill of Viminal, you get a message from Taely, the engineering prefect, asking if you could meet her in the cafeteria.`
	choice
		`	(Accept her invitation.)`
		`	(Not right now.)`
			defer
	`	Replying that you can, you make your way through the crowds and find an empty table. Moments later Taely appears and grabs two trays from the dispenser before heading towards you. She settles down in the opposite chair with a look of exhaustion.`
	`	"It is good to see you again, <first>," she sings softly. When you sign a reply she sits up, smiles, and switches to sign. "My, you are a quick learner. This is much faster." Her quick gestures are hard to follow, but the language videos seem to have focused on a practical vocabulary that has most of the words she uses.`
	`	"I have not fully..." (She makes a sign that you don't understand, but seems similar to the signs for "break" and "understand.") "... the technology you retrieved for us, but we are learning much from what we have already found. Could you help us catch up with what has happened in ancestral space since our Exodus?"`
	choice
		`	"Yes. What can I do to help?"`
		`	"Sorry, not interested."`
			decline
	branch data
		has "human cultural data"
	`	"Excellent! According to a friend of mine who is versed in history from the war, there were rumors that a grand library was being built in the Deep to house all of human knowledge. If it exists, that would likely be where to go."`
		accept
	label data
	`	"Excellent! According to a friend of mine who is versed in history from the war, there were rumors that a grand library was being built in the Deep to house all of human knowledge. If it exists..." She stops when she notices you nodding with a knowing expression. "You have already been there? Well, you certainly get around, Captain <last>. I suppose that makes things rather straight forward."`
	`	"I actually already have a copy of the library's data in my ship," you respond.`
	`	"Oh, that's even better," Taely trills. "Go ahead and get it."`
	`	You return to your ship to get the data chip, but when you glance out the cockpit you notice that the spaceport is more animated than usual. Remnant look to be running to their ships as fast as they can when you notice that Taely is halfway up the side of your ship securing a refueling hose and charging cable. As you reach for the commlink she scrambles up to the bridge windows and quickly rattles off a series of signs at you. All you can make out is "Keep it hot, incoming!" Before you can frame a reply she has raced across your wing and leapt to the Albatross parked next to you.`
		goto launch
	
	label return
	`Having acquired a copy of the archive, you gently set your ship down on Viminal hoping that this information is helpful. The port seems unusually busy, but the comm channels are quiet beyond the bare minimum to keep traffic organized.`
	`	Before you have even taken the time to shut down the engines Taely is halfway up the side of your ship securing a refueling hose and charging cable. As you reach for the commlink she scrambles up to the bridge windows and quickly rattles off a series of signs at you. All you can make out is "Keep it hot, incoming!" Before you can frame a reply she has raced across your wing and leapt to the Albatross parked next to you.`
	
	label launch
	`	Looking around more carefully, you note that every ship in the port is idling with fuel lines still connected. If this were some Republic port the safety inspectors would be having a nightmare. One Starling is getting holes in its wings patched even as the crew appear to be running prep-for-flight checklists. It also looks like every ship has a guard. Something tells you that right now would be a bad time to take a walk around town.`
	`	After some tense minutes of waiting, the planetary defense sirens start and the idling ships begin to ascend one by one. You quickly figure out where you are in the launch sequence and follow the stream of craft heading for orbit.`
		launch



mission "Remnant: Salvage 1"
	name "Remnant History Updates"
	description `The Remnant are interested in learning about what has happened in human space since they left. Find a copy of human history on <destination>.`
	minor
	source "Viminal"
	destination "Alexandria"
	to offer
		not "human cultural data"
		has "Remnant: Learn Sign Follow Up: offered"
		random < 50
		or
			has "Remnant: Catalytic Ramscoop: done"
			has "Remnant: Plasma Cannon: done"
			has "Remnant: Heavy Laser: done"
			has "Remnant: Tech Retrieval: done"
	on offer
		conversation "taely cultural data"
	on visit
		dialog
			`The station has a small museum gift shop that sells a copy of the entire archive on a data card. It only costs 40 credits, but because you have done a horrible job at managing your finances you do not have even that much cash on hand right now.`
			`	Go earn some money, then return here.`
	on complete
		set "human cultural data"
		payment -40



mission "Remnant: Salvage 1B"
	name "Remnant History Updates"
	description `Return the copy of human history to <destination>.`
	landing
	source "Alexandria"
	destination "Viminal"
	to offer
		has "Remnant: Salvage 1: done"
	on offer
		conversation
			`After having traveled clear across the galaxy, you finally arrive at the archives of human history. Upon asking a librarian where you could get a copy of the station's archives, you're surprised to have them point you to a gift shop. There you find a copy of the archives on a data card. ("The perfect gift for the budding historian in your family! Hold all of human history in the palm of your hand. On sale now for only 39.99!") Given that a cheap data card costs a fraction of a credit, it's a bit of a rip-off, but you gladly buy one to take back to Taely.`
				accept



mission "Remnant: Salvage 2"
	landing
	name "Defend <planet>"
	description "Assist in defending <planet> from a Korath raid, then return to the planet."
	source "Viminal"
	to offer
		or
			has "Remnant: Salvage 1B: done"
			and
				has "human cultural data"
				has "Remnant: Learn Sign Follow Up: offered"
				random < 50
				or
					has "Remnant: Catalytic Ramscoop: done"
					has "Remnant: Plasma Cannon: done"
					has "Remnant: Heavy Laser: done"
					has "Remnant: Tech Retrieval: done"
	on offer
		conversation "taely cultural data"
	npc
		government "Remnant"
		personality staying uninterested disables plunders
		fleet "Large Remnant" 2
	npc evade
		government "Korath"
		personality heroic plunders harvests target
		fleet "Korath Ember Waste Raid" 7
		fleet
			names "korath"
			cargo 3
			commodities "Food" "Clothing" "Metal" "Plastic" "Medical" "Heavy Metals"
			outfitters "Korath Exiles Remnant Donations"
			variant
				"Rano'erek"
				"'olofez" 4
	on visit
		dialog "There are still Korath raiders circling overhead. You should take off and help the Remnant ships to fight them."
	on complete
		payment 1000000
		conversation
			`As some ships maintain orbital sentry positions, most ships return to their berths. Mechanics are soon swarming over the ships, and what you suppose are ambulances are waiting at the ramps to collect the injured. Farther back, flatbed tractor units wait to pick up any salvage that has been collected.`
			`	Eventually a tired but pleased-looking prefect stops by your ship. He starts chanting, "Do you understand our language, or do I need to sing?" He looks relieved when you reply that you can understand most of what is said so long as he signs slowly. "Thank you for your assistance during the raid. The sensors you placed in Parca picked up the fleet coming in and gave us sufficient warning to get everyone ready."`
			`	He is silent for a moment, with the air of someone who is enjoying not having to run for the first time in a while. "Oh, Taely said that you might have some historical records for us?" You hand over the copy of the archive in response, telling him that it is probably the best available. He copies the archive onto a data pad, then returns it to you alongside a credit chip with <payment> on it. "Thank you, I will make sure this gets where it needs to go. In the meantime, we could use your help in the spaceport."`



mission "Remnant: Salvage 3"
	name "Transport injured Remnant"
	description `Some injured Remnant need to be transported away from the front lines to Aventine.`
	source "Viminal"
	passengers 8
	cargo "medical gear" 5
	blocked "A prefect informs you that they need to evacuate some injured to a hospital on Aventine, but you will need 8 free bunks and 5 tons of cargo space in order to handle the injured."
	stopover Aventine
	to offer
		has "Remnant: Salvage 2: done"
	on offer
		conversation
			`After watching the mechanics start repairs on the <ship>, you make the short trek to the spaceport common area. People are still rushing around as ships continue to land. No wrecks so far, and judging by the scrolling arrivals displays there are still quite a few ships on approach. Looking around for someone to talk to, you spot the prefect who had just visited your ship. He notices you and comes over. "No ships lost yet," he signs harshly, "but there are a few ships that have not checked in."`
			`	He shakes his head and continues, "We need to keep our medical facilities as free as possible. Could you take some of our injured to Aventine? They are stable and healthy enough for an unattended transport, and it would free up medics and space here."`
			choice
				`	"Of course."`
				`	"I'd rather not."`
					decline
			`	He looks relieved. "Thanks. I was going to have to divert one of our sentries to take them." He pauses and consults his commlink. "The medical team will have the injured settled onboard shortly, along with everything they need to ensure they arrive safely. They will probably have some fresh crew to send back with you."`
				accept
	on stopover
		dialog
			`The injured crew made for an eerily quiet jaunt from Viminal to Aventine. They didn't sing, and rarely signed. Some spent the trip mellowed out on powerful painkillers, while the few that left their rooms seem to be mostly intent on doing prescribed stretches and movements to help damaged muscles heal. Others that you check on appear to be meditating while an intravenous system feeds into their gloves. A few are interested in visiting with someone from outside the Ember Waste, but they lacked the energy to do so for long.`
			`	On Aventine there are ambulances and medical staff waiting to transport the injured to longer-term medical facilities. As they depart, a fresh crew arrives to take their places.`
	on visit
		dialog phrase "generic cargo and passenger on visit"
	on complete
		payment 100000
		set "license: Remnant Capital"
		conversation
			`When you return to Viminal, the Remnant crew members leave your ship and disperse across the tarmac to the ships they have been assigned to, each one of them signing their thanks as they leave. A few minutes after they leave your commlink beeps, notifying you that a message from the prefect has arrived:`
			`	"Captain <last>! Thank you for your help in defending Viminal and transporting those wounded. I have transferred a small token of our gratitude to you. That being said, perhaps you would appreciate this a bit more: the other prefects and I have agreed to grant you access to a wider range of ships. Our capital class ships will now be available to you, including the Albatross and the Pelican. At the rate these raids are going, it is in everyone's best interests that you have access to a better warship. Please, meet us in the spaceport to further discuss the situation."`



mission "Remnant: Salvage 4"
	name "Track down the <npc>"
	description "Track down and disable a Korath ship that escaped the raid on Viminal so that the Remnant may salvage it for technology."
	source "Viminal"
	to offer
		has "Remnant: Salvage 3: done"
	on offer
		conversation
			`Walking into the cafeteria you immediately sense the buoyant mood. According to a report on the video screen, very few Remnant ships were actually lost. Furthermore, of the ships that were lost, their escape pods worked perfectly, ensuring none of the crew were killed. Groups of crew members are gathered around tables covered in food, intermingled with the ground teams that keep their ships operational. Based on the snippets you can catch, they seem to be trading stories of crack shots and clever improvisations.`
			`	Taely sits over at a corner booth with the prefect who met you at the dock and a couple other mechanics, and she waves you over. "Captain <last>! So, how do you like fighting with our fleet?" asks one of the mechanics.`
			choice
				`	"It seems odd to have a planetary defense fleet plundering."`
				`	"It was a tough battle."`
					goto next
	
			`	"I suppose it would," chants one of them. "We need access to their tech, though. Otherwise we'll fall behind." Judging by the finality of his statement, this is held to be common knowledge among the Remnant.`
				goto next
	
			label next
			`	While you're conversing with the group, the prefect suddenly glances down at his commlink, reads a message, then looks up at you. "It appears that a Korath ship survived the raid and has destroyed a few ships without taking cargo. Could you deal with it?"`
			choice
				`	"Sure."`
				`	"Sorry, I don't have time to help you out."`
					decline

			`	"Thank you," he signs. "It is acting oddly, jumping around destroying ships instead of looting and running. If it simply looted and left we would be pleased, but now it is learning about us instead, so it has reached the end of its usefulness. Please disable it so that we can salvage parts from it." He pauses, then continues, "I doubt we'll be able to salvage the ship itself - they pack those things with soldiers - and we do not want it to be captured, even if that is possible for you. The ship and crew should remain intact, and we will salvage what we can after you have it disabled. If you salvage anything we will happily compensate you for it in the outfitter, but do not feel obliged to do so. Destroying the ship should be a last resort."`
				accept
	npc save disable
		government "Korath"
		personality heroic vindictive target uninterested waiting marked
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			variant
				"Palavret (Hyperdrive)"
		dialog "You have disabled the Korath ship that was left over from the raid on <planet>. You can now return there to collect your payment."
	on abort
		# No action, the player choose to just walk away from this mission(string)
	on fail
		payment 350000
		dialog `You are met by a prefect who looks upset. "The ship was supposed to be disabled so its contents could be salvaged!" he signs angrily. Nonetheless, he shoves a credit chip worth <payment> into your hand. "That's half what you would have earned if the ship had been disabled." He pauses and shakes his head. "I think Taely might have some more work for you in the spaceport, but in the meantime, why don't you go find some Korath to practice disabling? It is a valuable skill among the Remnant."`
	on complete
		payment 700000
		dialog `You are met by a prefect who thanks you for disabling it and hands you a credit chip for <payment>. "I think Taely might have some more work for you in the spaceport, but in the meantime, don't forget to drop off any salvaged outfits in the outfitters so the researchers can look at them."`



mission "Remnant: Salvage 5"
	name "Salvage Delivery"
	description `Deliver <cargo> to Caelian.`
	source "Viminal"
	destination "Caelian"
	cargo "Korath salvage" 20
	blocked `Taely would like you to deliver some valuable Korath equipment to Caelian, but you will need 20 tons of space to carry it.`
	to offer
		or
			has "Remnant: Salvage 4: done"
			and
				has "Remnant: Salvage 4: failed"
				not "Remnant: Salvage 4: aborted"
	on offer
		conversation
			`As you stroll across the tarmac under the great dome you spot Taely heading your way with a flatbed tractor filled with components in tow.`
			`	"<first>! I'm glad I ran into you. The last raid gave us some particularly good pieces of equipment to study. Could you take these to the weapons laboratory on Caelian?"`
			choice
				`	"I could do that."`
				`	"I'm not interested."`
					decline
			`	Taely quickly helps load the cargo onboard your ship. It doesn't appear to be actual whole items anymore, but rather pieces thereof. "They will be expecting you, but you might have to pry them out of their lab to get some help unloading. They can be a bit single-minded when they have something interesting to work on."`
				accept
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 150000
		dialog `On Caelian, you are able to find the appropriate research warehouse just off the main landing pad. After a few minutes, a lab technician disentangles herself from a project and brings a wagon and camel team out to the ship to unload the salvage. It strikes you as a bit incongruous that a lab technician is using a graviton repulsion lifter to load cargo from your ship into a wagon pulled by a camel. "If you can, I should have some things to send back to Taely if you could meet me in the cafeteria this afternoon."`



mission "Remnant: Salvage 6"
	name "Transport outfits to Taely"
	description `Deliver <cargo> to Viminal.`
	source "Caelian"
	destination "Viminal"
	cargo "ship parts" 20
	blocked `The technician you delivered Taely's salvaged parts to would like you to take some finished parts back to Taely, but you will need 20 tons of space to do so.`
	to offer
		has "Remnant: Salvage 5: done"
	on offer
		event "remnant salvage available"
		conversation
			`You spot the laboratory technician entering the cafeteria, and she approaches you.`
			`	"Thank you for waiting. I have a shipment of parts ready for Taely, and with the recent increase in attacks she needs them sooner rather than later. Please take them to her."`
			`	Outside you find a camel pulling a wagon filled with ship parts to be loaded on board the <ship>.`
				accept
		
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 150000
		conversation
			`Taely meets you at the dock with a flatbed ready to offload the shipment. As you run through your shutdown routine you hit the switch for the cargo bay doors, and by the time you have gone down to the hold, Taely has half the shipment already unloaded.`
			`	Her signs flick at you with a gentleness that you are slowly deciding equates to a cheerful tone. "Thank you for all the help you've provided in recovering this salvage," she says as she hands you <payment>. "I have discussed it with the other engineers, and we have decided to give you access to our salvage."`
			`	She leads you over to the warehouse, scans her ID on the console, and taps a few commands. Then she scans your ID card. "There you go, I have updated your access codes," she signs cheerfully. She hands you your ID and pulls you to a door on the far side of the outfitting shop. Beyond the door is a vast room filled with outfits and weapons that clearly don't fit the same style as the other Remnant technology. You have seen most of the things here on scans and when salvaging equipment from other ships, but rarely up close.`
			`	"This section of our warehouse is the salvage area. Everything in here, we have collected in sufficient quantities that it is available for general use." She nods at a rack of Korath Heat Shunts while she explains, then turns back to you.`
			`	"Of course the really advanced and rare stuff is still going to the labs first, and will not be available until we have learned all we can from it." She looks around proudly. "We do not have the industrial capacity or the number of researchers to keep up with the Alphas, the Korath, and whoever else might be out there. But we are very good at figuring out what others have built and learning from it.`
			`	"Any salvage or unrecognized technology gets scanned in our quarantine area for threats, then looked over to figure out if there is anything new in it. If there is, it is shipped to a lab for our researchers to dissect. Anything we have already figured out ends up in here, where a select few captains are welcome to use it as they see fit."`
			choice
				`	"Threats?"`
					goto threats
				`	"Interesting."`
			`	"Yes, it is, isn't it? So many new things out there to discover and learn about.`
				goto end
			label threats
			`	"Yes, sometimes salvage that is brought in is dangerous. A Systems Core comes with fleets of micro-bots, for instance. If they aren't de-activated properly, they keep trying to rebuild their surroundings in the form of the last ship they were configured to serve. And while it hasn't happened yet, we are worried that someday we might run into someone who builds traps into their equipment, or uses nanobots that have run amok. We have not seen any of that yet, but our science-fiction stories are filled with tales of nanotech apocalypses and things like that.`
			label end
			`	"Well, I need to get back to work. That last battle put us behind schedule on our repairs. Have a good day!" With a final flourish that you think is the equivalent of an exclamation mark, Taely strides out of the outfitters, heading towards another landing bay.`



mission "Remnant: Scanning Tolerances"
	name "Deliver Data to <planet>"
	description `Deliver data crystal to a Remnant named Torza on <destination>.`
	landing
	deadline 15
	source
		government "Remnant"
	destination
		government "Remnant"
		not distance 0
		not attributes "remnant station"
	to offer
		has "license: Remnant Capital"
		not "remnant untrusted"
		not "Deep: Remnant 3: Revealed: done"
		"reputation: Remnant" >= 100
		random < 30
	on offer
		conversation
			`You were just in the process of disembarking from the <ship> when a young Remnant jogs up to you. "Good day, Captain <first>. Sorry to interrupt, but we have an urgent delivery that needs to go to Torza on <destination>. Could you deliver this please?"`
			choice
				`	"Yes, I can."`
					goto agreement
				`	"What is it?"`
					goto questioning
				`	"Sorry, not right now."`
					defer
			label questioning
			`	"A data archive with the latest briefings and analyses. Heavily shielded and encrypted, of course, so no need to worry about it showing up on a scan. It has to get there by <date>. So, could you do it?" They hold out a small case with a data crystal visible through the window.`
			choice
				`	"Yes, I can."`
					goto agreement
				`	"Sorry, not right now."`
					defer
			label agreement
			`	"Thank you." They hand you the case. "Take it to <destination> by <date>. Torza will meet you there."`
				accept
	on complete
		event "remnant: scanning tolerance"
		conversation
			`You step out of the <ship> to see a non-descript Remnant standing attentively next to the landing pad. "Captain <first>! We have been waiting for you." They lead you into a nearby bunker. Inside, a single Remnant is standing over a hologram displaying fortifications and what appear to be troops and ships moving around.`
			`	"Torza, Captain <first> is here." The Remnant's gestures convey a deep sense of respect.`
			`	The Remnant steps forward and accepts the case from you. The case pops open, and he slots the crystal into a spot on the display. He nods as the display pops up several confirmations of data integrity. "Well, you have certainly made many ripples since you arrived in our little corner of the galaxy." He gestures and the large display zooms in on a spot to show you walking through a spaceport outfitter. The display shifts to show you helping wounded onto your ship. The scene shifts again to show you launching the small stealth surveillance satellite. Then the table shifts back to the display of troop movements.`
			`	"You have not been with us too long, but you have shown yourself to be trustworthy and eager to help." He gestures at the display. "As you can see, your actions have not gone unobserved. We have decided to amend your IFF registration as a result." He points to a set of slots next to the table similar to the ones that are installed on your ship. "Please place both your licenses in those slots, and I will confirm your side of the change."`
			choice
				`	(Place my licenses in the designated spots.)`
					goto comply
				`	"You have been watching me?"`
			`	"Yes. There is very little that goes on in our worlds that is not observed by someone, and sometimes these events garner more attention than others." He looks at you. "You are one such. As a stranger among us, you were subject to much attention, although you probably did not notice most of it. Some felt it was too risky to trust you as far as we did, but the consensus was that you are worth the trust. Now," he gestures towards the console again, "place your licenses there, please."`
			label comply
			`	Once you do as you are told, he inserts several unique objects, which share similarities with your licenses, into slots on his side of the table and taps several controls. "You are not yet one of us, but this brings you one step closer. Your IFF signature has been updated, and our ships' databases will be updated within a day." He removes the licenses and hands yours back to you with a relieved expression. "We are a curious people, and we fully understand the search for knowledge and to learn more about one's surroundings. But we also know how important it is to maintain our secrets.`
			`	"Going forward, you are now authorized to scan Remnant ships, and we encourage you to do so, although you should wait a day or two for the update to propagate through our fleet." He looks amused by something, but his serious expression returns. "Scanning each other is, after all, a valuable form of security that gives us opportunities to spot infiltrators and unknown contaminants on returning ships. Scans are uploaded to our databases for signature matching via the Quantum Entangled Communicator built into the IFF mechanism onboard your ship, and we will return information such as alien outfit identification and tactical scan readouts whenever possible to help you."`
			`	He gives a tired sigh. "While I would enjoy answering a few of your questions, I should get back to supervising the operation." He gestures at the display, which has resumed showing the tactical movements of troops. "Thanks again for all your help, <first>."`



mission "Remnant: Expanded Horizons Quarg 1"
	name "Visiting the Quarg"
	description "Take Remnant researchers to <destination> to see the Quarg."
	minor
	source
		government "Remnant"
	destination "Wayfarer"
	passengers 3
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		has "Remnant: Salvage 2: done"
		has "First Contact: Quarg: offered"
		random < 40
	on offer
		conversation
			`As you relax in the cafeteria on <origin> you are approached by a young Remnant. Judging by the hand-held sensors and tools hanging off her belt, you suppose she is a researcher or an engineer.`
			`	"Hello Captain <last>. My name is Dawn, and I have been spending the past few days skimming the archive you retrieved. I wanted to ask you a few questions. May I?"`
			`	She slides into the chair opposite you without waiting for your reply, and pulls out a data pad. "Firstly, our histories mention how humanity met a race called the 'Quarg' and had some ongoing dialogs with them, but not much beyond that. Now here in this history that you brought us, it says that humanity has started exchanging technology with them! Is this true?" She looks at you intently. You sign negatively, and she dejectedly continues. "Could you explain about them, then?" You reply that the Quarg have allowed humanity to live near them, and that the Quarg are usually willing to answer questions, including scientific ones. You continue, elaborating that while the Quarg don't seem to mind having an innovative shipyard studying them as best it can, they don't actually share their technology with anyone.`
			`	After several hours of telling her about meeting the Quarg and visiting their worlds, it finally occurs to you that it would be easy enough to take her to visit the Tarazed system.`
			choice
				`	(Offer to take her there.)`
				`	(Don't offer.)`
					decline
			`	You offer to take her and a couple of her colleagues to see the Quarg. She eagerly accepts, although she expresses a preference for landing on the human world, so they can observe the Quarg ships from a distance, as they would rather not draw any attention to themselves. She runs out of the cafeteria after telling you they will meet you at your ship in half an hour.`
				accept
	on visit
		dialog `You land on <planet>, but realize that you left Dawn and her colleagues on one of your escorts that hasn't entered the system. Better depart and wait for it to arrive.`
	on complete
		log "People" "Dawn" `Dawn is a young Remnant researcher with a strong interest in engineering. She has yet to pick a specialty, but appears to have a talent for exo-engineering.`
		conversation
			`Dawn and her colleagues are thrilled with the trip. While they had each served on Remnant ships exploring the Ember Waste or patrolling their territory, none had ever been more than a handful of jumps away from their own space. They explain that their ships were always cautious to stay far away from human space to avoid leading anyone back.`
			`	It occurs to you that Dawn and her colleagues seem much less reserved than most Remnant. You aren't sure if it is because they are younger, less secretive, or if the Remnant have been holding back from you. It is also possible that you just have better opportunities to figure it out now that you can understand their signs.`
			`	Upon arriving at Wayfarer they spend a considerable amount of time watching the few Quarg in evidence. However, it is easy to see that the real draw of their attention is the ships. You wave your ID across the scanner for the shipyard and take them inside to see what Tarazed Shipyards has on display.`
			branch rich
				"net worth" >= 20000000
			`	After a few minutes a sales agent meanders over to ask if there's anything he can do to help. You ask a few questions about the different ships for Dawn's benefit, listen to the sales agent repeat a few lines from the display, then politely tell him you'll just browse on your own.`
				goto end
			label rich
			`	Almost before you are in the main hall a sales manager is at your side, inquiring as to how he can help. You can almost see the credit signs in his eyes and you suspect that scanning your license may have done a quick check of your net worth too.`
			`	You ask a few leading questions about new designs and play the part of a captain with more money than brains, and the manager eagerly directs you to the large hangars near the end that house their largest and fanciest ships. After it becomes clear that he doesn't have any experience flying them you politely disentangle yourselves from him to look at the ships in peace.`
			label end
			`	After an hour of browsing, the young Remnant agree to meet you back at the spaceport in an hour and take off to the outfitters.`



mission "Remnant: Expanded Horizons Quarg 2"
	name "Quarg Scanning"
	description "Perform an outfit scan on the Quarg ship <npc>, then land again on <destination>."
	source "Wayfarer"
	to offer
		has "Remnant: Expanded Horizons Quarg 1: done"
	on offer
		conversation
			`Dawn and her fellow researchers show up a few minutes after you do, excitedly talking about the various things they have seen. "<first>, there is a Quarg ship taking off shortly, and we were hoping you might be able to get scans of it while it is in flight. It would be really helpful for our understanding of how they work."`
				accept

	on accept
		log "Volunteered to show Dawn and some of her fellow researchers the world where humans and Quarg co-exist."
	
	npc "scan outfits"
		government "Quarg"
		personality staying uninterested target launching
		fleet "Quarg"
		dialog
			`Dawn and her compatriots eagerly pore over the readouts as they come in, then ask if you could land again to compare their scans to ones taken on the ground.`

	on visit
		dialog `You have landed on <planet>, but you have not yet scanned the <npc>'s. Depart and use an outfit scanner to scan the ship.`
	on complete
		conversation
			`The Remnant researchers' attention to detail is impressive. They carefully quantify every aspect of the scans, including notes about the ship's behaviors. By the time you are on the ground again, they have amassed quite a collection of data crystals filled with analysis. You note that they are careful to ensure everything they collect is backed up in multiple places, including what appears to be a small lead lined box.`
			`	Dawn does some follow-up scans of idle Quarg ships, and her fellow researchers take some time to make sure all their pictures are crisp and detailed. They let you know that they will meet you back in the spaceport bar once they are done.`



mission "Remnant: Expanded Horizons Quarg 3"
	name "Expanded Horizons Return"
	description "Return the Remnant researchers to <planet>."
	source "Wayfarer"
	destination
		government "Remnant"
		not attributes "requires: gaslining"
	passengers 3
	blocked `This mission requires bunks for three passengers.`
	to offer
		has "Remnant: Expanded Horizons Quarg 2: done"
	on offer
		conversation
			`Back in the spaceport bar you wait around for a couple hours. Just when you were about to go find them, the trio walk in looking like they had spent all day on the move, but otherwise unreadable.`
			`	"Okay, I think we are ready to go. Can you take us to <planet>?"`
				accept
	on visit
		dialog `You land on <planet>, but realize that you left Dawn and her colleagues on one of your escorts that hasn't entered the system. Better depart and wait for it to arrive.`
	on complete
		payment 150000
		conversation
			`Once you are back in the privacy of the <ship>, the stony reserve fades to cheerfulness as the trio are a blur of motion, chattering back and forth with their signs. Apparently this will be one of the biggest boosts to their research since the first time they salvaged the gear off a Korath raider.`
			`	They eventually slow down their signs a bit and explain that up until the time the Remnant departed from ancestral space, human scanners had been unable to penetrate the outer layers of Quarg ships. One of Dawn's fellow researchers continues with the explanation.`
			`	"Our historical records just have a few pictures and videos of Quarg ships, along with a basic scan that doesn't provide more than the general outline of the ship. These scans," he says while tapping the databanks, "actually picked up detailed structural layouts and even identified a number of key components. It isn't nearly enough information to be able to duplicate them, but it is enough that we can start trying to figure out how they work."`
			`	Upon arriving at <planet> they quickly thank you, hand you <payment>, and run back to their offices to finish prepping their material to publish and distribute.`



phrase "broken jump drive on visit"
	word
		`You've landed on <planet>, but you don't have a broken jump drive to give to the Remnant. You may need to steal one from Palavrets or Rano'ereks found through Remnant jobs, or depart and wait for an escort carrying one to enter the system.`

mission "Remnant: Broken Jump Drive 1"
	repeat
	minor
	landing
	name "Broken Jump Drive Delivery"
	description "You have been asked to deliver a broken jump drive to the researchers on <planet>."
	to offer
		has "remnant: blood test pure"
		not "Remnant: Broken Jump Drive 1: active"
		not "Remnant: Broken Jump Drive 1: done"
	source
		government "Remnant"
		attributes outfitter
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not attributes "remnant station"
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			branch repeated
				has "Remnant: Broken Jump Drive 1: offered"
			`As the <ship> settles onto its designated landing pad, you see someone emerge from the nearby outfitter and quickly make their way to you. The man waits a safe distance before approaching once you cycle the hatch and disembark. "Greetings, Captain <last>," trills the Remnant, "we saw the news that the newcomer among us was tracking down an erratic Korath ship. When you came in to land, we saw on the scans that you salvaged its malfunctioning jump drive. Could we take it to study?"`
			choice
				`	"Maybe later."`
					goto refuse
				`	"That would be a good use for it."`
					goto accept
			
			label repeated
			`You have a broken jump drive that the Remnant might be interested in. Do you want to seek out someone to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	You find a Remnant director and inform them about the broken jump drive that you have.`
			
			label accept
			`	"Excellent!" he glances at his data pad. "There are several teams working on aspects of the jump drive, and the team with the highest priority for this one is on <planet>. I will notify them to expect you."`
				accept
			label refuse
			`	He considers this, and sings, "If you wish. Our offer stands, whenever you choose to return."`
				decline
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`When you arrive on <planet> there is a team of engineers and mechanics waiting for you, along with a flatbed freight truck. Once you open the cargo doors they quickly free the broken jump drive from its moorings and load it delicately onto their truck. The lead engineer comes over to hand you <payment>. "Thank you for salvaging this. I suspect my compatriot who spoke to you never mentioned this, but we have a fund set aside for rewarding captains who bring in rare pieces of alien technology. If you find any more of these drives, there is sure to be a research team somewhere that is willing to reward you for it."`
			choice
				`	"I will keep a lookout for more."`
					goto end
				`	"Aren't you going to replace it with a hyperdrive?"`
			`	The engineer looks at you incredulously. "You mean you were actually trying to use this drive?" He shakes his head in disbelief. "You are lucky you managed to get this far, then. It is surprising that they exist at all, so it is too much to expect them to work too. If you need a replacement drive, there are plenty available in the outfitter.`
			label end
			`	"Next time you find one of these drives, just check with a starport director. They will know where it will need to go. A word of warning though; I strongly recommend not trying to use these drives - they may disappear at the most inconvenient of times, and there will not always be an outfitter on hand." He turns and heads off with the rest of the team, turning briefly to give you friendly wave as they disembark.`



mission "Remnant: Broken Jump Drive 2"
	name "Broken Jump Drive Delivery"
	description "The researchers on <planet> have requested your broken jump drive."
	to offer
		has "Remnant: Broken Jump Drive 1: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not attributes "remnant station"
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	Information must flow quickly amongst the Remnant, because by the time you arrive at the director's desk she already has the information ready for you.`
			`	"Greetings, newcomer," she chants. "Are you interested in turning in the broken jump drive you salvaged to our researchers?"`
			`	You nod.`
			`	"They will definitely appreciate new material to research. The team is located on <planet>. I will send a notification ahead so they will be expecting you."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`As promised, there is a team of researchers waiting when you settle onto the designated landing pad. One comes over to hand you <payment> while the rest carefully unload the broken drive and start hauling it back to their lab.`
			`	"Our thanks, Captain <last>. Having the remains of a drive like this will be very beneficial to our efforts." His voice cracks a bit, as if unused to being used much.`
			choice
				`	"Great! I will find more."`
					goto end
				`	"What are you studying?"`
			`	"Our previous research into jump drives determined that these drives are unsurprisingly multi-part systems. We know the outer part that we can see and handle is mostly the machinery for generating some kind of containment field or pocket. As to how it works or why it is needed..." his chant trails off and he makes a gesture you suspect may be the equivalent of a shrug. "Anyway, our team is focused on the nature of this outer system. It is our hope that, damaged as it is, its continued existence might allow us to look a little farther inside its inner workings to figure out exactly what that field does and how it is used.`
			label end
			`	"Well, my compatriots finished unloading rather quickly, so I should be off. For all our sakes, I hope you find more of these for us."`



mission "Remnant: Broken Jump Drive 3"
	name "Broken Jump Drive Delivery"
	description "The researchers on <planet> need a broken jump drive for testing."
	to offer
		has "Remnant: Broken Jump Drive 2: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not attributes "remnant station"
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	As you approach the director in the spaceport concourse, he looks up and waves at you. "Good timing, Captain <first>," he sings. "We have a team of researchers on <planet> who have requested a broken jump drive. Could you deliver one to them?"`
			`	"I can," you respond.`
			`	"Excellent. The recent discovery of these broken drives has spurred discussion and excitement in various quarters. We have had teams researching jump drives for at least a century now without a lot of success. I'm told they are rather intricate, but your finds are opening new avenues of investigation. That being said, I will notify the team on <planet> to expect you."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`The team waiting for you on <planet> is definitely eager to begin. You barely have the hatch open before they are chivying their camel-pulled wagon up the ramp. They load the broken jump drive surprisingly quickly despite their delicate movements.`
			`	"This is an exciting day, Captain <first>! Countless theories may be proven or put back into the fires of refinement based on the testing we can do with this!"`
			choice
				`	"Great! I will find more."`
					goto end
				`	"Any theories of note?"`
			`	He looks thoughtful for a moment, then warbles, "As you may know, standard hyperdrives work by generating a fusion reaction and folding it into the fabric of space/time, and these folds naturally fall along the known hyperlanes. I suppose one could view those lanes as the 'crease lines' of the universe. My favorite theory is that jump drives have some additional machinery to guide the fold. That way they can dictate where the fold occurs instead of just aligning with the nearest crease. Given their increased fuel draw, it makes sense that it would take more fuel to generate a fresh fold than to reuse an existing crease.`
			label end
			`	"Oh, before I forget..." he hands you <payment>. "Off to start setting up the tests." He sings half to himself as he trundles off after the wagon.`



mission "Remnant: Broken Jump Drive 4"
	name "Broken Jump Drive Delivery"
	description "You have been asked to deliver a broken jump drive to the researchers on <planet>."
	to offer
		has "Remnant: Broken Jump Drive 3: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not attributes "remnant station"
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`You head over to the director's desk to see who is in need of the next broken jump drive. The director smiles at you, looks over several messages on her screen, then clears her throat.`
			`	"Your finds are very much in demand," she sings. "Could you bring this one to a team working on <planet>?"`
			`	You nod in response.`
			`	"Thank you. We are looking forward to seeing what comes from this."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`As you approach your designated pad, you spot a team of researchers with unloading equipment hustling out of a nearby entrance. Once you have completed your shutdown sequence they quickly set to work unloading the drive. Once the task is complete, they pause for a moment to hand you <payment>. "Thanks for finding this," they sing in unison. "Our labs are eager to begin work on your most recent find, Captain <first>. Our thanks!"`
			choice
				`	"Good luck with that."`
					goto end
				`	"How is your research going?"`
			`	"Good, and about to get better," they sing. "We are working on various aspects of a theory that the jump drive actually disregards traditional jumping entirely, and uses the folding mechanism to put the ship itself into a pocket, while somehow triggering an opening to said pocket in the target system." One of them continues, "If this is true, it could be fairly dangerous to try activating these anywhere close to fragile things like cities or mountains, which is why they put our lab on the far side of the planet from all such things.`
			label end
			`	"Well, we have a bit of a trip to get to our lab, but it should be exciting once we get there. Fare well!" With that, they head off towards a large vehicle nearby.`



mission "Remnant: Broken Jump Drive 5"
	name "Broken Jump Drive Delivery"
	description "A team of engineers on <planet> would like a broken jump drive to study."
	to offer
		has "Remnant: Broken Jump Drive 4: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not attributes "requires: gaslining"
		not attributes "remnant station"
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	You stop by the director's desk to report having salvaged another broken jump drive for one of their research teams. The director nods in appreciation and checks his list. "There is a new team starting a project on <planet>. Could you take it there please?"`
			`	"Sure," you respond.`
			`	"Much appreciated. The sooner they get it, the sooner they can start on their project. That being said, I have spoken with the other directors, and we have decided that we are getting so many requests that we will put these into the job board for you. Any time the landing scans detect one of these broken jump drives, the system will display a message on the job board listing where the next one needs to be delivered."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		event "remnant: research update bjd1" 100 200
		"reputation: Remnant" ++
		conversation
			`The landing pad on <planet> is tucked away just behind the spaceport. A handful of engineers have a conveyor belt already set up to offload the drive from your ship when you arrive. When you open the hatch they extend it right up the ramp, and quickly load the drive onto it. The machinery quickly whisks the drive into a nearby structure along with its escort. A couple of the engineers stop by to talk with you and hand you <payment>.`
			`	"Thanks for bringing us this drive. It is a rare piece of technology for us to get our hands on."`
			choice
				`	"I will leave you to it."`
					goto end
				`	"What are you studying?"`
			`	With a pleased expression they break into song about mining the deeps for the mysteries of the sky. As best you can tell, they are trying to figure out the materials that the drive is made with, followed by experiments to replicate those materials.`
			label end
			`	"Our experiments await. May your search be fruitful!" they trill as they head off.`



mission "Remnant: remnant research update compatibility"
	landing
	invisible
	to offer
		has "event: remnant research update bjd1"
	on offer
		event "remnant: research update bjd1"
		clear "event: remnant research update bjd1"
		fail



mission "Remnant: Face to Maw 1"
	landing
	name "Talk to Plume about the void sprites"
	description "Plume would be very interested in a report on what happened with the void sprites."
	to offer
		has "event: remnant: return the samples timer"
		has "flagship model: Puffin"
		or
			not "Remnant: Cognizance 1: offered"
			has "Remnant: Cognizance 19: done"
	source
		system "Nenia"
	destination "Aventine"
	on offer
		conversation
			`As the swirls of gas close over the <ship> you wonder idly what brought you back here. This time, there is no apologetic researcher asking you to risk your life for research, or to return eggs from where they were stolen. You catch a glimpse of the Archon materializing above the clouds as it decloaks, letting you know that you're being watched, but saying nothing; for now, it is nothing more than a silent, brooding presence in the skies of Nenia. The silent depths of an alien world fold over you, gradually erasing the rest of the galaxy from sight.`
			`	As the <ship> levels off at the designated altitude, you strap yourself into a pressure suit. Stepping into the airlock, you grimace at the antiquity of these "hard-shell" shield systems, and lower the shields so that you can exit onto the hull. Out on the surface, you admire the misty kaleidoscope of colors filtering down through the cloud layers, playing over distant shapes moving in the mists.`
			`	Before long several void sprites emerge, weaving and dancing among the clouds. They swirl for a few minutes around your cargo bay doors as if waiting for something, then pulse briefly with flickers of light and drop into the clouds below. Another void sprite flutters around the <ship>, poking at the hull and sliding over it with its tentacles. You quickly think to turn on your video recorder to catch the scene. The void sprite notices your brief movement, and turns towards you with a lunge. As it closes on you, your attention is drawn to what you suspect is its mouth: a zig-zagging crack that peels open like a zipper to reveal an opening that resembles an industrial grinder.`
			`	Up close, the void sprite is massive. Most of its tentacles are easily as thick as your leg, and move with surprising speed and precision. It shifts through the air like a strange deep-sea fish in water. You can make out a low vibration you suspect is from the air whistling over the void sprite as it closes with you. As the giant creature rapidly approaches, you can feel a heavy paralysis weigh down on you. Suddenly, you recall that your shields are keyed to your equipment; you could activate them to protect yourself and they would extend around you. It probably wouldn't be too healthy for the void sprite, though.`
			choice
				`	(Activate the shields.)`
				`	(Do not activate the shields.)`
					goto holdground
			`	You push against the paralysis and trigger the shields in a rush. The millisecond that follows feels like an eternity. The void sprite is just a few meters away, one tendril reaches out and touches you just as the shield slams into place. The tendril becomes caught on both sides of the shield, cleaving it in two. In the same instant, the pressure on your mind vanishes as if it was simply a dream. You momentarily stare at the immobile void sprite, frozen in shock over what just happened. Then time reasserts itself and the sprite spasms away from the ship with an unearthly crescendo of dissonant tones. It plunges down into the clouds, leaving you standing on your hull with the floating severed piece of tendril.`
			`	You carefully scoop up the tendril in a container and seal it. While the attack spoiled the beautiful moment, at least you have a sample and some recordings that might be of interest to Plume.`
				flee
			label holdground
			`	The feeling of paralysis leaves your body as the void sprite is only a few meters away, but you resolve yourself to face down the creature without triggering your shields. Time seems to slow down as the sprite rushes up to you and its leading tentacle reaches out to touch you. As you brace for an impact you realize that the sprite has managed to bring itself to a complete stop and the tentacle has telescoped in on itself slightly. You can see that it is touching you, but you didn't even feel the impact. You and the void sprite stand frozen for a moment, and the force trying to paralyze you snaps off, replaced by a feeling of weightlessness. Moments later the void sprite pulls back and pulses skyward with an unearthly fountain of sounds, spiraling around the <ship> before disappearing into the swirling clouds.`
			`	As you re-enter the ship, you notice that your suit is covered in some kind of translucent slime. You scrape off as much as you can into a sealed container, but your pressure suit appears to be permanently stained an iridescent purplish color as a result. You resolve to go find Plume, since he will almost certainly find this interesting.`
				accept
	on accept
		fail "Remnant: Face to Maw 1B"
	on complete
		conversation
			`When you walk into Plume's lab on Aventine you find him buried in some kind of holographic projection of your egg returning mission. You can see that he appears to be watching the video in slow-motion as he taps out notes on his data pad. After a few minutes he looks up and sees you standing in the entryway. He quickly pulls himself out of the projection and hits what you assume must be the pause button.`
			`	"Captain <first>! What a pleasant surprise," he trills. "If you are looking for more work, I don't have anything for you right now."`
			`	You tell Plume about how you visited Nenia and had an interesting encounter with a void sprite, and offer him the recording and container of slime. He eagerly accepts the data chip and the container from you. Sliding the container into some kind of machine, it immediately starts to whir as he slots the data chip into his console. Moments later his holographic projection shifts to the new footage. He checks the timestamps, then chants, "These will take me a little while to analyze. I will meet you in the spaceport in a few hours to discuss my preliminary findings."`



mission "Remnant: Face to Maw 1B"
	name "Talk to Plume about the void sprites"
	description "Plume would be very interested in a report on what happened with the void sprites."
	landing
	to offer
		has "event: remnant: return the samples timer"
		has "flagship model: Puffin"
		or
			not "Remnant: Cognizance 1: offered"
			has "Remnant: Cognizance 19: done"
	to fail
		or
			has "Remnant: Face to Maw 1: done"
			has "Remnant: Face to Maw 1: active"
	to complete
		has "Remnant: Face to Maw 1: declined"
	source
		system "Nenia"
	destination "Aventine"
	on complete
		conversation
			`When you walk into Plume's lab on Aventine you find him buried in some kind of holographic projection of your egg returning mission. You can see that he appears to be watching the video in slow-motion as he taps out notes on his data pad. After a few minutes he looks up and sees you standing in the entryway. He quickly pulls himself out of the projection and hits what you assume must be the pause button.`
			`	"Captain <first>! What a pleasant surprise," he trills. "If you are looking for more work, I don't have anything for you right now."`
			`	You tell Plume about how you visited Nenia and had a threatening encounter with a void sprite, and offer him the recording and container with the tentacle. Plume recoils from you in disgust. "After all our work rebuilding trust with the Archon and the void sprites, you go and risk it for... what, exactly? Sightseeing? Thrill of the hunt?" His chant settles into an angry tone. "Leave the recording on the console. I want no part of that tentacle, though."`
			`	As you are leaving Plume's lab a technician pulls you aside. "Our records mention that the tentacles had some interesting properties that were useful in combat. If you are interested, meet me in the spaceport in a few hours."`



mission "Remnant: Face to Maw 2"
	name "Bring slime to <planet>"
	description "The void sprite slime has properties of interest to a team of engineers on <planet>."
	to offer
		has "Remnant: Face to Maw 1: done"
	source "Aventine"
	destination "Viminal"
	cargo "slime sample" 1
	on offer
		conversation
			`When Plume finally arrives you can tell from his step that he is excited. He slides onto the bench opposite to you and pulls out a data pad. "I admire your bravery, Captain. I don't think I would have had the courage to hold my ground against a void sprite like that," he chants respectfully, then changes tone to one of wonder. "In that last moment it almost looked like it was sizing you up or examining you." He shakes his head with an amused expression. "I spend so much time studying non-human creatures I sometimes slip and start anthropomorphizing them." His voice takes on a more militant cadence. "That was probably some kind of territorial display, or possibly some kind of dominance challenge. We don't know enough about void sprite behavior to speculate further, though.`
			`	"Be that as it may be, the more immediate reward for your curiosity is in this sample," he trills with excitement. "Several of our labs on Viminal have been working on the development of a new generation of ship technology, and this substance contains some chemicals that could be a key component. I have already transmitted the data to them, but they would like to compare with the original. Could you take this sample to them?"`
			choice
				`	"Yes, I can."`
					accept
				`	"I would rather not."`
			`	Plume stoically accepts that with a nod. "That is your choice. I will arrange for another ship to transport it."`
				decline
	on accept
		event "remnant: penguin"
	on complete
		log "People" "Taely" `One of Taely's main priorities is improving the maneuverability characteristics of Remnant Ships. To this end she has been working on building a new prototype ship based on the void sprites.`
		"remnant met taely" ++
		give ship "Penguin" "Shadow Hope"
		conversation
			branch taely
				has "remnant met taely"
			`When you land on Viminal a solidly built female Remnant in coveralls is waiting for you. "Greetings, Captain <first>. My name is Taely, and I am a Prefect among the Remnant. Above all else, I study motion, and in particular how our starships move."`
				goto main
			label taely
			`	When you land on Viminal you spot Taely waiting for you. "Greetings, Captain <first>. It is good to see you again."`
			label main
			`	She makes a gesture you are starting to recognize as a sign of curiosity. "So, Plume sent us some very interesting data, along with a message to expect you with a sample?" You hand her the container with the slime sample and she holds it up to the light. "Interesting looking substance," she chants. "Let's go back to my workshop."`
			choice
				`	"Okay, let's go."`
					goto follow
				`	"Could I catch up with you in a minute?"`
			`	"Sure, just don't take too long. My project has reached its final stage."`
			`	You take your time to get to the workshop, admiring the view along the way. When you finally arrive at the workshop you can hear strange noises coming from inside, accompanied by the smell of a thunderstorm in a swamp. You step into the workshop and come to a stop to stare at the thing in front of you.`
				goto skip
			label follow
			`	She leads the way through several side passages to an out-of-the-way landing pad connected to a large hangar. Inside, you can see a giant tank filled with a murky fluid, surrounded by equipment and displays. She makes her way over to a large machine with several slots which she slides the container into.`
			`	As the machine starts to work, she turns back to you. "As the primary example of space-faring life, the void sprites have always been of interest to me. They have numerous advantages that we as atmosphere-bound creatures can only dream of, such as being able to experience space in a much more direct manner. I have been working on a side project to build a new generation of ships that melds these ideas with our current technology, but the data we have on the void sprites is centuries old and incomplete." Her chant trails off as she pulls up a display with your original scans on them. "However, your recent explorations provided new data I could use to update my designs. This slime that you retrieved is the final ingredient."`
			choice
				`	"So my data is helping to develop new technology?"`
				`	"That's good. Any chance of a bonus for me?"`
			`	The machine dings, and she looks over the results and then trills excitedly. "Yes, it matches! So it is time to begin the final activation." She strides over to a central console and taps in a series of commands, followed by an iris scan and a blood prick. The industrial hum of the room suddenly ramps up to a crescendo as your nose is assaulted by what you can only describe as the smell of a thunderstorm in a swamp. A few seconds later the noise softens, and the tank starts lowering into the floor as a shape emerges from the liquid.`
			label skip
			`	The ship before you has some faint traces of the Puffin you have flown to Nenia, along with other elements of Remnant design, but it is clearly something new. Its antennae swivel around, as if taking in its environment, and the tentacles along the side twitch and reach out to touch its surroundings. Solidly built tendrils underneath it flex as it lifts itself off its supports and begins to move around. You have a momentary vision of what this ship might look like in the skies of Nenia.`
			scene "scene/penguinscene"
			`	Taely's droning chant of technical details finally seeps through your reverie: "... So from a captain's point of view flying the Penguin should be very similar to a normal ship, except she flies herself and doesn't need a crew to run her systems." She pauses, and looks at you. "Your curiosity provided the final ingredients to bring her to life. You should be the first to have one." She pats the nose of the Penguin and it makes a whooshing noise. "I call her the 'Shadow Hope,' but you can rename her whatever you like." After a moment she starts going over the ship with a scanner, leaving you to contemplate in silence.`



mission "Remnant: Face to Maw 2B"
	name "Bring tentacle to <planet>"
	description "The tentacle has properties that may be put to use by the engineers on <planet>."
	to offer
		has "Remnant: Face to Maw 1B: done"
	source "Aventine"
	destination "Caelian"
	cargo "tentacle" 1
	on offer
		conversation
			`When the technician arrives in the spaceport he immediately strides over to you. "I checked the records, and my memory was correct. One of our research teams centuries ago discovered that these tentacles could be used as a devastating weapon in close quarters combat."`
			`	He pulls out an image of a strange-looking rifle and continues to chant, "The personal weapons lab under Prefect Chilia has a few of the old weapon frames. If you go visit it on Aventine, they could turn this tentacle into a potent weapon for you."`
			choice
				`	"That sounds good."`
					accept
				`	"I would rather not."`
			`	The technician looks disappointed. "Oh well, enjoy your trophy."`
				decline
	on complete
		payment 250000
		"remnant chilia" ++
		outfit "Void Rifle"
		conversation
			branch chilia
				has "remnant chilia"
			`You follow the directions provided to you and eventually find yourself at a Remnant weapons lab. You enter and are met by security, who asks you to wait. A few minutes later a fit young man emerges from another door. "Greetings, Captain <first>," he sings. "I am Prefect Chilia. I have the nominal responsibility for the overall defense of Remnant space and military operations." He smiles deprecatingly. "I say 'nominal' as virtually all our activities are militaristic in some way, but usually fall under the purview of those who better understand them."`
				goto main
			label chilia
			`You follow the directions provided to you and eventually find yourself at a Remnant weapons lab. You enter and are met by security, who asks you to wait. A few minutes later a fit young man emerges from another door. "Greetings, captain <first>," he sings. "We meet once again." You immediately recognize the voice as being the man who convinced you to provide the blood sample and get to know the Remnant. "We didn't get a proper introduction last time, but you have probably figured out that I have the nominal responsibility for the overall defense of Remnant space and military operations." He smiles deprecatingly, "I say 'nominal' as virtually all our activities are military in some way, but usually fall under the purview of those who better understand them."`
			label main
			`	He leads you to a room that looks like an armory where a team of technicians is putting the finishing touches on a rifle stock. "The request from the technician on your behalf caught my attention, as we have not had the key resources for making Void Rifles in centuries. Fortunately, we have not really needed them since we resolved the threats that originally plagued our settlements."`
			choice
				`	"It's called a 'Void Rifle'?"`
				`	"I don't need details."`
					goto end
			`	"Yes, Void Rifle. I don't know who discovered it, but someone figured out that if a particularly high charge was poured through the tentacle's nervous system in a specific pattern, it emits a paralyzing cone of energy with a reasonably decent range. I'm neither an engineer or a biologist, so I do not really understand the mechanics of it." He pauses to watch as a technician installs the now-caged tentacle on top of the stock. "Suffice it to say, it is useless for sniping, but its ability to shoot through walls and affect areas makes it excellent for sweeping ships and building-to-building clearing operations.`
			label end
			`	"All right, enough history." He turns to the technicians who are finishing the assembly. "The tentacle has been treated to resist decay and the stock mechanisms will provide basic maintenance routines for as long as you charge it regularly." He strides over, picks up the completed Void Rifle, and then hands it to you. "You are holding a piece of our history, Captain. Use it well!"`
			scene "outfit/void rifle"



mission "Remnant: Keystone Research 1"
	name "Retrieve more keystones"
	description `Retrieve quantum keystones from the Hai for the Remnant to study, starting in <destination>.`
	minor
	source "Viminal"
	destination "Greenwater"
	cargo "(reserved)" 19
	to offer
		random < 30
		has "Remnant: Learn Sign 2: done"
		has "Remnant: Technology Available: offered"
		or
			has "Remnant: Key Stones: done"
			has "Remnant: Key Stones (Hai): done"
			has "Remnant: Key Stones (Pre-Hai) 2: done"
	on offer
		log "People" "Aeolus" `As an outfitter, Aeolus is responsible for managing the logistics that supply the Remnant with materials, equipment, and resources. In contrast to outfitters in what the Remnant term "ancestral space," he is focused on ensuring the efficient optimization of Remnant ships, not making a profit.`
		conversation
			`In the spaceport cafeteria, you spot the outfitter who asked you to retrieve a shipment of Hai keystones. He notices you and waves you over, gesturing at an empty chair opposite him.`
			`	"Greetings, <first>! I trust you are settling in among us?" he signs using simple gestures. "I picked up a rumor that you are learning our language, too." You sign the affirmative as you sit down. "Good, that is useful." He pauses, then continues, "I never introduced myself before. My name is Aeolus, and I help manage resource logistics for our fleets." He eyes you for a moment, then ventures, "You came in here with the appearance of looking for something. Is there something on your mind?"`
			choice
				`	"How is the outfit business going?"`
				`	"That last job paid rather well. Do you have any more like it?"`
					goto crystaljobs
			`	"Well, fairly well. Stocks are up, there are quite a few new outfits in the current, and some recent supply line disruptions have been resolved," he gestures appreciatively. "I am told that we have you to thank for some of that.`
			`	"Those 'quantum keystones' you brought back have been quite interesting. The process of dismantling them for analysis yielded some intriguing results." He notices your expression. "Oh, you were expecting me to sell them, weren't you?"`
			choice
				`	(Nod affirmatively.)`
					goto notforsale
				`	(Shrug noncommittally.)`
					goto notforsale
				`	"No, I suspected they would be studied instead."`
					goto notreally
				`	"What does 'outfits in the current' mean?"`
			`	"Oh, that's just an expression. 'Current' refers to a current of air or water as a metaphor for the development process. It means that there are outfits that are progressing in the development process." He taps at his commlink for a moment. "Back before the Exodus, there was a saying: 'products in the pipeline.' I think that has a comparable meaning to us having 'something in the current.' I am curious, though. Were you expecting me to sell them?"`
			choice
				`	(Nod affirmatively.)`
					goto notforsale
				`	(Shrug noncommittally.)`
					goto notforsale
				`	"No, I suspected they would be studied instead."`
			label notreally
			`	Aeolus looks pleased at that. "You are correct. Finding something that does what the Quantum Key Stone does without being identical to it is clearly much more valuable as a subject of research than as a miscellaneous commodity. Add the security implications of slapping an alien device on a ship without thoroughly dismantling it, and the fact that we are not actually concerned with profit in the classical sense, and it is clear that they should not be simply dumped into the outfitting inventory."`
				goto clarification
			label notforsale
			`	He looks slightly embarrassed. "Sorry to disappoint you, but none of those outfits were ever going to be used in the form they came in, for several different reasons." He ticks them off on his fingers as he lists them. "First, security: slapping an alien device on every ship without having thoroughly dismantled them would be an invitation to getting tracked. Second, research: something that does what the Quantum Key Stone does without being identical to it? Definitely interesting to our researchers. And third, purpose."`
			`	He pauses to take a drink. "Unlike what you are probably used to from the outfitters you dealt with back in the ancestral worlds, my purpose is not to make money. Instead, I ensure that Remnant captains have the resources they need. What you see listed as the 'price,' Remnant captains see listed instead as a 'logistics adjustment' that indicates the amount of resources needed to supply that component. Every ship has a resource budget allocated to it, determining how much it can utilize for repairs, restocking, and improvements."`
			label clarification
			choice
				`	"Wait, you didn't sell any of that?"`
				`	"Okay, so that shipment you had me get...?"`
			label crystaljobs
			`	"I have to apologize for that. We knew from our histories that anyone from the ancestral worlds would be attracted by the opportunity to earn a profit, and we needed to give you both a reason to stay, and a way to gauge your willingness to help. Your shipment was definitely useful, but we had to ensure we framed your job in a way that made sense without revealing what we were actually doing.`
			`	"So no, I don't have any jobs 'just like the last one,' but I know our researchers would like another shipment. Are you interested?"`
			choice
				`	"Yes."`
				`	(Sign in the affirmative.)`
				`	"Why would you assume that I needed a financial motivation?"`
					goto greed
				`	(Decline.)`
					decline
			label crystaldecision
			`	"Great. They would like you to pick up another 19 keystones. Two differences this time: first, we would like you to pick them up from several different planets. And second, by the time you reach Hai space, we will have made arrangements so the shipments will be already paid for and waiting for you. Pick up the first stones on Greenwater, then the next set on Allhome. I will have a list sent to you by the time you reach Allhome."`
			`	"That being said, if you happen to pick up any additional keystones, you can turn them in to the logistics office. They will handle the distribution and compensate you accordingly."`
			choice
				`	"Wait, how will you get this all set up?"`
				`	"Sounds good."`
					accept
			branch remnantuntrusted
				has "remnant untrusted"
			`	Aeolus looks faintly amused. "While you are certainly adventurous, you are not the only one to have traveled widely. We mapped the Hai systems long ago with cloaked ships, but never landed or contacted any of them. So we never knew anything more than what we could observe from orbit or from scanning ships. But you are known to them, and have a fairly public reputation. By using your transponder codes, we can place and pay for orders through hyperspace relays. All we need is a ship in position to feed the signal into the network."`
				accept
			label remnantuntrusted
			`	Aeolus smiles mysteriously at you. "Let's just say that you are not the only resourceful person among the Remnant. We will share more with you once you have demonstrated your loyalty."`
				accept
			label greed
			`	"While we don't know what is happening on the surface of planets in Ancestral space, we do pick up a fair number of transmissions. Between those and our historical records, it is clear to us that 'making money' is the main motivation for why those in ancestral space do anything. Whether it is ferrying cargo, building a structure, or protecting someone; everything we see says that humanity in ancestral space requires credits for everything it does. And then beyond that, the larger the amount of credits, the more enthusiastic they are to do it." Aeolus shakes his head, looking visibly perturbed. "This is what we see. Tell me, are we wrong? A quote we have seen more than a few times says 'Money makes the world go round,' and everything we have seen supports that attitude."`
			choice
				`	"No, you aren't wrong. Money is the reason people work."`
					goto greedconfirmation
				`	"Yes and no. Most people work for money, but it isn't their only motivation."`
					goto greedpartial
				`	"You are wrong about that. Some people are all about money, but not everyone."`
				`	"This isn't about everyone, this is about me. I'm not here for the money."`
			`	"I am glad that some are willing to act for what is right, necessary or even just curiosity; and not just what they are paid for. It gives me hope for ancestral humanity." His look brightens a bit. "So, are you interested in another job to help us?"`
			label greedchoice
			choice
				`	"Yes."`
					goto crystaldecision
				`	"No."`
					decline
			label greedconfirmation
			`	Aeolus nods sadly. "We appreciate the confirmation, and hope to learn more about those who remained in ancestral lands. It is depressing, however, to think that humanity is so self-centered to put financial wealth as such a high priority. Nonetheless, we do have another job for you. Are you interested?"`
				goto greedchoice
			label greedpartial
			`	Aeolus nods. "So financial wealth is a priority of necessity, but not necessarily what they would prefer to focus on. Interesting. That gives me a bit of hope." He pauses to consider this, then continues. "The economic beliefs of humanity aside, are you interested in helping us out?"`
				goto greedchoice
	on complete
		dialog
			`It takes a few minutes to contact the yardmaster, but once you do, a mixed crew of Hai and human dockworkers have the crates moved promptly from the warehouse to your cargo bay. Hai and humans seem accustomed to working together here.`



mission "Remnant: Keystone Research 2"
	name "Retrieve more keystones"
	description `Retrieve quantum keystones from the Hai for the Remnant to study, next from <destination>`
	landing
	source "Greenwater"
	destination "Allhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 1: done"
	on complete
		payment 250000



mission "Remnant: Keystone Research 3"
	name "Retrieve more keystones"
	description `Retrieve quantum keystones from several Hai worlds, ending on Newhome.`
	landing
	source "Allhome"
	destination "Newhome"
	stopover "Makerplace"
	stopover "Stonebreak"
	stopover "Giverstone"
	stopover "Cloudfire"
	stopover "Snowfeather"
	stopover "Icelake"
	stopover "Heartvalley"
	cargo "Keystones" 4
	to offer
		has "Remnant: Keystone Research 2: done"
	on offer
		conversation
			`True to Aeolus' word, there are crates of Hai quantum keystones waiting for you. As you ensure they are securely loaded, your comm system informs you that a message has arrived. It has no indication of provenance, but appears to be a notification that a payment of 250,000 credits marked 'on-assignment allowance' has been made to your account.`
			`	The attached message is brief and to the point. "Greetings, Captain <first>. Hopefully the shipments were waiting for you. We have made arrangements for samples to be acquired from Makerplace, Stonebreak, Giverstone, Cloudfire, Snowfeather, Icelake, and Heartvalley. Once you have collected all those, head to Newhome. There are a few other places that we are still working to set up, and we should have those ready by the time you reach Newhome."`
				accept
	on complete
		payment 250000
		dialog
			`You are just checking in with the port authorities to locate your shipment when your commlink indicates a pair of messages incoming. While you wait for the second one to load, you see the first message is a deposit statement indicating that a payment of <payment> has been deposited from a "Solar Winds Logistics Ltd."`



mission "Remnant: Keystone Research 3A"
	invisible
	landing
	source
		planet "Makerplace" "Stonebreak" "Giverstone" "Cloudfire" "Snowfeather" "Icelake" "Heartvalley"
	destination "Newhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 3: active"
	on offer
		conversation
			`You quickly locate and load the shipment of quantum keystones. The packaging comes with brochures and images depicting comfortable-looking Hai relaxing on a spaceship observation deck. "Guaranteed to provide the smoothest flight for your passengers!" reads one of the labels.`
				accept



mission "Remnant: Keystone Research 3B"
	invisible
	landing
	source
		planet "Makerplace" "Stonebreak" "Giverstone" "Cloudfire" "Snowfeather" "Icelake" "Heartvalley"
	destination "Newhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 3A: active"
	on offer
		conversation
			`Sure enough, there is a pair of crates waiting for you. This time the brochure depicts a pair of distinguished elderly Hai relaxing in front of a matte painting.`
				accept



mission "Remnant: Keystone Research 3C"
	invisible
	landing
	source
		planet "Makerplace" "Stonebreak" "Giverstone" "Cloudfire" "Snowfeather" "Icelake" "Heartvalley"
	destination "Newhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 3B: active"



mission "Remnant: Keystone Research 3D"
	invisible
	landing
	source
		planet "Makerplace" "Stonebreak" "Giverstone" "Cloudfire" "Snowfeather" "Icelake" "Heartvalley"
	destination "Newhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 3C: active"



mission "Remnant: Keystone Research 3E"
	invisible
	landing
	source
		planet "Makerplace" "Stonebreak" "Giverstone" "Cloudfire" "Snowfeather" "Icelake" "Heartvalley"
	destination "Newhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 3D: active"



mission "Remnant: Keystone Research 3F"
	invisible
	landing
	source
		planet "Makerplace" "Stonebreak" "Giverstone" "Cloudfire" "Snowfeather" "Icelake" "Heartvalley"
	destination "Newhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 3E: active"



mission "Remnant: Keystone Research 3G"
	invisible
	landing
	source
		planet "Makerplace" "Stonebreak" "Giverstone" "Cloudfire" "Snowfeather" "Icelake" "Heartvalley"
	destination "Newhome"
	cargo "Keystones" 2
	to offer
		has "Remnant: Keystone Research 3F: active"



mission "Remnant: Keystone Research 4"
	name "Retrieve more keystones"
	description `Return the quantum keystones to Viminal.`
	blocked `The cargo is ready to load, however you do not have enough free space. Come back when you have <tons> of free space.`
	landing
	source "Newhome"
	destination "Viminal"
	cargo "Keystones" 19
	to offer
		has "Remnant: Keystone Research 3: done"
	on offer
		conversation
			`As you were reading the previous message, a freight hauler arrives with the last few crates and starts unloading them. Looking over the assembled stack, you note that each crate bears the logos and advertisements for a different organization, shipper, or enterprise. The second message turns out to be a confirmation that you have picked up 19 keystones. While there are no new instructions, the subtext is clear: Time to head back.`
				accept
	on complete
		payment 2000000
		conversation
			`As you descend through the clouds to Viminal, you get the feeling someone is watching you, but your sensors show nothing more than a smattering of Gulls and a patrol squad in the distance. Looking down, you spot an extra battery of anti-air artillery next to the main entrance to the spaceport. You note the weapons tracking you and quickly tap your recognition code into the IFF system. Within seconds, the large guns are swinging back to cover the initial approach.`
			`	Passing through a cavernous opening into the great spaceport dome, there is a shimmer in the air next to you as a Starling fades into view, settling onto the adjacent platform. The pilot signs a quick, "Greetings, anticipating talking with you," before heading back toward their lock. Behind them, the Starling continues its shutdown checks without any supervision at all.`
			`	As you finish your own shutdown routine, your commlink informs you that your account has been updated with <payment>.`



ship "Starling" "Starling (Keystone)"
	outfits
		"Inhibitor Cannon" 3
		"Point Defense Turret"
		
		"Epoch Cell"
		"Crystal Capacitor"
		"Emergency Ramscoop" 2
		"Quantum Keystone"
		"Salvage Scanner"
		
		"Forge-Class Thruster"
		"Forge-Class Steering"
		"Crucible-Class Steering"
		"Hyperdrive"



mission "Remnant: Keystone Research 5"
	name "Scan the <npc>"
	description `Go scan the <npc> in <waypoints> to record the keystone post-wormhole.`
	landing
	waypoint "Peragenor"
	source "Viminal"
	to offer
		has "Remnant: Keystone Research 4: done"
	on offer
		conversation
			`You exit the ship to find that the pilot is actually Aeolus, who has already marshaled some dock workers with a number of wagons and lifters to unload the cargo.`
			`	"Ah, <first>, thank you for retrieving all these keystones." He sweeps some kind of a device over the crates, then opens one. He pokes at the contents, and pulls out a brochure with a picture of a quantum keystone and a pair of respectable looking Hai. "What's this?" He asks curiously. "Because I bought a keystone, they think I might need more? That seems like a decidedly inefficient way of promoting their product."`
			choice
				`	"I'm not a fan of it either."`
				`	"Those 'inefficient' capitalists did provide a keystone at one twentieth the cost you do."`
					goto capitalists
			`	"You will probably do well here, then. Keep production and resources focused on the goal, that always made the most sense to me." Aeolus signs with confidence. "But economic theory aside, we have some science to do.`
				goto work
			label capitalists
			`	"You've got a point there." Signs Aeolus. "Assuming they value a credit the same as we do and they aren't taking a loss, then it appears they do have a significant production and processing cost advantage." He takes on a defensive tone. "But for all we know, the supply of raw materials is much greater in Hai space, or most of these keystones could be simply recycled from older ships. And that is something we want to figure out." He brightens again. "That being said, we already have the first steps set out."`
			label work
			`	"Our researchers have decided that we need to test how a ship performs with one of these keystones compared to a regular Key Stone. My ship has been outfitted with one built from the samples you brought us earlier. We request that you meet us in Peragenor, where you will scan us after going through the wormhole. Then we will return here and swap out the Hai keystone with one of our Key Stones. Then we will go back to Peragenor and perform another scan. By using the same ships for both tests, we should be able to get the best data."`
			choice
				`	"Wait, you are a pilot?"`
				`	"Okay."`
					accept
			`	"Oh, yes. It is actually quite common among the Remnant. I am not a particularly good pilot, but it is considered an important skill that is taught to almost everyone as a part of a general education. It is especially worthwhile for those of us who work directly with starships on a daily basis and may be called upon to move or fly one at a moment's notice." His gestures suggest both pride and humility as he talks about his piloting skills. "Anyway, let's go!"`
				accept
	npc "scan outfits" "save"
		government "Remnant (Research)"
		personality coward decloaked disables mining plunders staying surveillance target
		system "Peragenor"
		ship "Starling (Keystone)" "Winds of Light"
		dialog
			`The scanner chimes softly, informing you that it has completed scanning the Winds of Light and has successfully archived the data.`
	on visit
		dialog `You land on <planet>, but you have not scanned the Starling in <waypoints>. Make sure you scan the ship before returning.`
	on complete
		payment 150000



mission "Remnant: Keystone Research 6"
	name "Scan the <npc>"
	description `Go scan the <npc> in <waypoints> to record the Key Stone post-wormhole.`
	landing
	waypoint "Peragenor"
	source "Viminal"
	npc "scan outfits" "save"
		government "Remnant (Research)"
		personality coward decloaked disables mining plunders staying surveillance target
		system "Peragenor"
		ship "Starling" "Winds of Light"
		dialog
			`The scanner chimes softly once again, informing you that it has completed scanning the Winds of Light and has successfully archived the data from this second scanning.`
	to offer
		has "Remnant: Keystone Research 5: done"
	on offer
		conversation
			`When you and the <npc> settle back onto the landing pad, there is already a dockworker waiting with a Key Stone. Once the Starling is settled, the dockworker climbs up the outside of the ship, hooks the keystone to a lift and disconnects it from the ship. As the keystone is hauled up to the roof another lift lowers the replacement Key Stone. The dockworker quickly installs it and jumps down, landing gracefully from the several-meter drop.`
			`	"Ready? Let's go!" Aeolus signs as he fires up his systems and gestures an acknowledgment to the dockworker. You check your cameras and see the worker nimbly step clear of the engine exhausts as the two ships head back out of the dome.`
				launch
	on visit
		dialog `You land on <planet>, but you have not scanned the <npc> in <waypoints>. Make sure you scan the ship before returning.`
	on complete
		payment 150000
		conversation
			`While in transit, you took the opportunity to examine the preliminary results of the scans: there are a few differences between the two stones, but both appear to have functioned similarly. Upon landing on Viminal, Aeolus comes over to collect a copy of the data for the researchers.`
			`	"Thanks for your help, Captain <first>. This information may be valuable in understanding how the wormholes work." He pauses, then continues thoughtfully. "Perhaps more importantly, it may help us understand how the wormholes of the Ember Waste are different from the wormholes elsewhere that require no such aid."`
			`	He looks down at the data crystal. "I have one more task to ask of you. Meet me in the cafeteria in an hour to discuss it. May the Embers burn bright for you, Captain." He gives a wave that seems vaguely like a salute and heads off.`
			`	As he disappears from sight you hear a faint chime from your commlink, which displays a message indicating that two payments of <payment> have been allocated to your account. You recall that you didn't get a message after the last mission, so whichever Remnant person or agency is sending you these payments must have combined them. You do find it odd, however, that they always seem to know exactly when you finish a delivery.`



mission "Remnant: Keystone Research 7"
	name "Deliver Data to <planet>"
	description `A copy of the scanner data needs to be delivered to the researchers on <destination>.`
	source "Viminal"
	destination
		government "Remnant"
		not distance 0
	to offer
		has "Remnant: Keystone Research 6: done"
	on offer
		conversation
			`You walk into the cafeteria and spot Aeolus halfway through an impressively large meal. He waves you over, and by the time you are seated a tray with a significantly smaller meal is waiting for you. While you have become accustomed to a few of the dishes, most of them are still very unappetizing.`
			choice
				`	"The Remnant sure like to eat."`
				`	"Why do the Remnant eat so much?"`
					goto foodvolume
				`	"Maybe I should import some spices."`
					goto spices
				`	"What is our next step?"`
					goto deliverdata
			`	Aeolus chuckles and makes an amused gesture. "An army lives and dies by its food! A poorly fed soldier is but a short step away from being a deserter, or even a traitor. While we have had lean years in the past, these days we ensure everyone is well fed."`
				goto deliverdata
			label foodvolume
			branch capitallicense
				has "license: Remnant Capital"
			`	He looks at you appraisingly. "There are some things you cannot learn yet. Ask us again when you have earned more of our trust."`
				goto deliverdata
			label capitallicense
			action
				"remnant symbionts info" += 1
			`	He leans forward and holds up his hands, poking at the leather fingerless gloves he is wearing, and you realize that they extend up under his sleeves. You note that the leather does not actually look like any leather you have seen - it has fine scales and rough ridges on it. What stands out the most, however, is that it appears to pulse faintly.`
			`	"The truth is, when we eat, we are eating for two. You will have to ask someone else how they came to be or how it works, but suffice it to say that we have developed a symbiotic relationship with a variety of creatures we found here. These ones," He explains while holding up his hands, "have a knack for accuracy and durability. With them, I am more precise than I would otherwise be, and much tougher. In exchange, they feed through us and require regular care and attention. Normally, this causes us no hardship, but if we do not eat enough, we will consume our reserves far faster than we normally would."`
			choice
				`	"That is quite the revelation."`
				`	"Thanks for the explanation."`
				`	"Is that why some of the food tastes terrible?"`
					goto terribleflavor
				`	"Sounds creepy."`
					goto creepy
			`	Aeolus nods. "From what I have heard, the ancestral worlds do not seem to have much in the way of exoskeletons or cybernetics. The living organisms we wear would certainly seem to be the realm of science-fiction." He contemplates his symbiont for a few seconds as he absent-mindedly eats more of his meal. "But education aside, there is work to do."`
				goto deliverdata
			label spices
			`	He shakes his head. "I will not discourage you doing so - and I am sure some might appreciate them - but most of us like our food the way it is." He chuckles, then continues. "But there is still work to do."`
				goto deliverdata
			label terribleflavor
			`	"I suppose it might. Our symbionts have different dietary requirements, and such unusual compounds in our food inevitably change the flavor. We are all long since used to it, but it would definitely be different for an outsider." He seems amused by this. "But enough of food - there is work to do!"`
				goto deliverdata
			label creepy
			`	"Creepy? I do not understand how something so useful and beneficial could be 'creepy,' but I suppose some might equate our symbionts with leeches. To each their own, I suppose." He shrugs, then continues. "But enough. We still have work to do."`
			label deliverdata
			`	He pulls out a small metal briefcase and sets it on the table. "Another delivery mission for you, Captain. A short one, at that. We need you to take this case of data crystals with our preliminary data to some researchers on <destination>. This will allow them to combine the data we have collected with their most recent findings, and perhaps help us take a step forward towards understanding the nature of both these stones and the wormholes. Will you do it?"`
			choice
				`	"Okay."`
					accept
	on complete
		payment 100000
		conversation
			`A young researcher is waiting for you when you exit the <ship>. "Thank you for your assistance, Captain," she signs with one hand as she accepts the briefcase with the other. "There has been a lot of concentrated study on the wormholes over the past several centuries. While we know much about them..." she makes a convoluted gesture that you think translates to "knowing that you don't know."`
			`	"Now, thanks to your acquisitions, we have the opportunity for new insights. We are looking forward to learning more about these anomalies. May the Embers burn bright for you, Captain." With that, she turns and heads off towards a lab.`
			`	As you contemplate the implications of the Remnant studying the wormholes, your commlink chimes with a notification of another payment of <payment> being made to your account.`



mission "Remnant: Expanded Horizons Astral 1"
	minor
	name "Preparation for expedition"
	description "Travel to <destination> to prepare for an expedition to Sagittarius A*. Ensure that you have at least six tons of outfit space available."
	passengers 1
	source
		government "Remnant"
	destination
		government "Remnant"
		not distance 0
		not attributes "requires: gaslining"
	to offer
		has "Remnant: Expanded Horizons Quarg 3: done"
		random < 25
	on offer
		conversation
			`You glance into the starport cafeteria and see Dawn sitting at a table looking worried. She hasn't noticed you yet. Do you approach her?`
			choice
				`	(Yes.)`
				`	(Not right now.)`
					defer
			`	She smiles when she sees you, and waves you to the seat opposite her. "Back from gallivanting around the galaxy with more tales to share?" she signs.`
			choice
				`	"Yes, as a matter of fact..."`
				`	"No, just hunting Korath..."`
				`	"No, just testing some stuff..."`
				`	"You look worried. Is something happening?"`
					goto worried
			`	She listens for a minute or two as you tell her about what you've been up to, but it's obvious that she has something else on her mind.`
			choice
				`	"You look worried. Is everything alright?"`
				`	"You look distracted. Do you want to talk about it?"`
			label worried
			`	She makes a gesture of appreciation. "Yes, I am worried, <first>. I keep feeling like there is something I am missing." She frowns, contemplating something unseen. "I should back up a step. Since we last talked, I was assigned to serve with an astrophysics team for a year. My current work is part of the quantum condensate fabric density project, and I have been tasked with reviewing our bulk astrophysical data. It is fairly routine, but I keep getting this prickly feeling that there is a problem that I am missing. Nothing obvious, of course. Our neural networks would pick up something explicit or repetitive very quickly. But the feeling just will not go away."`
			choice
				`	"Have you asked someone with more experience for advice?"`
				`	"Don't worry about it."`
					goto worry
				`	"Can I help with something?"`
					goto help
				`	"What is the quantum condensate fabric density project?"`
					goto quantumcondensate
			`	"I did. The senior researcher told me that most of the team feels something is not quite right here. They say there are some potential theories, but nothing definitive, so they want me to investigate on my own without contaminating my thoughts with their ideas for now."`
				goto help
			label quantumcondensate
			`	"It is basically a project examining the density of Bose-Einstein condensates as correlated to the revised relativity paradigm's conceptualization of the fabric of space-time. It has a lot of potential implications, particularly for ramscoop, scanner, and weapons technology. At least, that is the hope. For now, though, I am trying to figure out what is off about this data."`
			choice
				`	"Have you asked someone with more experience for advice?"`
				`	"Don't worry about it."`
					goto worry
				`	"Can I help with something?"`
					goto help
			`	"I did. The senior researcher told me that most of the team feels something is not quite right here. They say there are some potential theories, but nothing definitive, so they want me to investigate on my own without contaminating my thoughts with their ideas for now."`
				goto help
			label worry
			`	"Thanks for the advice, but that is our purpose here - to worry about all the things that humanity either cannot handle or that it turns a blind eye to. No, if there is something in the data to cause worry, we need to find it."`
			label help
			`	"If you would like to help, there is something you can do. I am currently putting together an expedition to Sagittarius A* to collect some fresh data I can use to check our records, and I could use a transport..." She looks at you hopefully.`
			choice
				`	"I don't know where that is."`
					goto center
				`	"Isn't that the center of the galaxy?"`
					goto centeralt
				`	"I have been there."`
			`	"Really?" She looks surprised. "I have seen sensor logs and recordings from previous visits, but not many people have actually been there." She pauses to take a bite from her neglected meal. "Being able to take part in these fieldwork expeditions is something I have been looking forward to for ages, so of course Sagittarius A* is the first place on my list."`
				goto center
			label centeralt
			`	"Yes, that is correct." She signs firmly.`
			label center
			`	Her signs take on a rhythmic pace as if reciting something. "Sagittarius A* is a strong astronomical radio source and a supermassive black hole that is located at the center of the Milky Way. According to our best measurements, it has a mass of 3F6290 solar masses and is surrounded by a ring of gas and dust that can range from 63 to 24D2 degrees Kelvin."`
			`	She returns to a conversational cadence. "Would you be interested in taking part in this expedition?"`
			choice
				`	"Sure, what do you need?"`
					goto scienceequipment
				`	"You want me to take you to a black hole?!"`
				`	"Sorry, I'm not interested in visiting a black hole."`
					decline
			`	She looks momentarily surprised by your reaction. "Yes, exactly that. Current gravitational repulsor engines can nullify most of the gravitational pull, and an extra Thermoelectric Cooler or two should be sufficient to manage the heat. As such, the risks are manageable so long as you do not try to approach the event horizon.`
			label scienceequipment
			`	"For this particular mission, we will need some additional scientific equipment that is actually hardwired into your ship, not just carried along with us. When we arrive on <planet>, they will have the equipment ready to install. Just be aware that it will require six tons of outfit space and a scientist to run it, so you will need a free bunk for them, too.`
			`	"Once the laboratory module is installed, it will simply be a matter of traveling to Sagittarius A*. After our measurements, recordings, and observations are complete, we will return and report on our findings."`
			`	She glances down at her half-finished meal. "I am already packed and ready to go. I will meet you onboard the <ship> as soon as I am done eating."`
			branch dawnsymbiont
				has "remnant symbionts info"
			choice
				`	"Okay, I will meet you onboard the ship."`
					accept
				`	"Developed quite the appetite, haven't you?"`
			branch dawnlicense
				has "license: Remnant Capital"
			`	She shrugs. "I burn a lot of calories, and healthy eating is important. Besides, I don't know how good food will be on your ship." She resumes eating with vigor and does not seem inclined to continue the conversation.`
				accept
			label dawnlicense
			`	"I am not yet used to the nutrient intake required to maintain my symbiont, so I have to consciously make sure that I eat enough to sustain it."`
			choice
				`	"Symbiont? What is that?"`
					goto whatis
				`	"What? You're joking, right?"`
			`	"Suit yourself. I will meet you onboard once I'm done." She shrugs, and returns to eating.`
				accept
			label whatis
			action
				"remnant symbionts info" += 1
			`	"Oh, no one has told you about them? I thought once you'd demonstrated your trustworthiness and earned your capital ship license you would have found out." She pauses to take another bite, then continues.`
				goto dawndetails
			label dawnsymbiont
			choice
				`	"Okay, I will meet you onboard the ship."`
					accept
				`	"Developed quite the appetite, haven't you?"`
			`	She nods. "Yes, I am not yet used to the nutrient intake required to maintain my symbiont, so I have to consciously make sure that I eat enough to sustain it."`
			choice
				`	"Interesting. I will see you onboard the <ship>."`
					accept
				`	"Could you tell me more about them?"`
			label dawndetails
			action
				"remnant symbionts info" += 1
			`	"In short, we domesticated some of the creatures found here ages ago and discovered that they could be attached to us to form a symbiotic relationship." She pauses again to eat. "I only recently received mine, so I am not fully adjusted to it yet."`
			choice
				`	"Okay, that's as much as I need to know."`
					goto onwards
				`	"What is it like to have a symbiont?"`
			`	"Oh, it is wonderful. It is very hard to describe. At first it is just slimy, then a lot of tingling. The tingling lasted for several hours, and then it was just like waking up: rising up out of darkness to a brighter world with just so much to see and learn. Suddenly, it was as if everything was moving slower, and I could take a long, hard look at everything..." Dawn is visibly excited, signing so fast you have trouble following.`
			choice
				`	"Thanks for the description. I should go prep the <ship> now."`
					accept
				`	"Where is your symbiont? Yours does not seem to be obvious."`
					goto dawnwhere
				`	"Could I see your symbiont?"`
			`	Dawn looks at you with an amused expression. "We do not know each other nearly well enough for that. Better to focus on the expedition. I will catch up to you on the ship."`
				accept
			label onwards
			`	She nods. "Well, I will finish my meal and meet you on the <ship> shortly." With that, she returns to her meal.`
				accept
			label dawnwhere
			`	Dawn looks at you with an amused expression. "Just as every human is a unique individual, so every symbiont is also unique. As such, they attach to different areas of the body. We do not know each other well enough for me to tell you more than that.`
			`	"We should probably be focusing on the expedition, though. You go get the <ship> ready for launch, and I will be there shortly."`
				accept
	on accept
		event "remnant: lab availability"
	on complete
		outfit "Research Laboratory"
		conversation
			`You follow the directions of the starport control and settle onto a pad next to the outfitter. You barely have a chance to finish your landing checks before a team of Remnant have a compact pod waiting on your loading ramp. Once you open the cargo bay doors, they pick it up and maneuver it inside. They start securing it to the ship while Dawn and one of the scientists approaches you.`
			`	"We have loaded the Research Laboratory onboard. The team will install it if they can find the space, but if they do not, it will be secured in the cargo bay," The Remnant scientist explains. "Before you depart, please verify that the laboratory is installed in the correct location. You know your ship better than we do, after all." She turns back to Dawn and makes a gesture of respect. "Embers guide your path, Seeker." With that, she strides away into the hive of activity that is the outfitting bays.`
			choice
				`	"So, what is our next step?"`
					goto labnext
				`	"Seeker?"`
			`	Dawn looks a little embarrassed. "Seeker is a title of respect for deep space explorers. It is unofficial - just a token of respect - but it is a title that I both aspire to earn and do not feel I deserve yet."`
			choice
				`	"I thought all Remnant were spacefarers?"`
				`	"Okay. So what next?"`
					goto labnext
			`	"Oh, we are. Every Remnant has had some experience in space. But there is a big difference between a few weeks of duty in a spacefaring post and spending months or years drifting in the void surrounding distant systems."`
			choice
				`	"Years drifting in the void?"`
				`	"Okay, let's get on with this."`
					goto labnext
			`	"If you want good data, you need to spend time to get it. And especially when we are tracking stellar phenomena, you need periods of long observation. Snapshots of the sky are good - that is what we will be collecting on this trip. But for watching the galaxy at large, other civilizations, and things of that ilk... Nothing is better than long-term observation." She looks lost in thought for a moment. "That is neither here nor there, however.`
			label labnext
			`	"Now that you have the Research Laboratory, you will need to locate a jump drive in order to reach Sagittarius A*." She pauses and checks her commlink. "If you do not already have one, you can salvage one from a Korath raider. Our early warning system indicates that there are several incoming Korath fleets that should be here within the next day or two. Any one of them should have a jump drive you can take. Meet me in the starport once you have a jump drive."`



mission "Remnant: Expanded Horizons Astral 2"
	name "Research expedition to Sagittarius A*"
	description "Travel to Sagittarius A* with a Research Laboratory installed in order to make measurements on the supermassive black hole and then return to <destination>."
	blocked "You need a jump drive and a research laboratory to take this mission."
	source
		government "Remnant"
	destination
		government "Remnant"
		not attributes "requires: gaslining"
	waypoint "Sagittarius A*"
	to offer
		has "Remnant: Expanded Horizons Astral 1: done"
	on offer
		require "Jump Drive"
		require "Research Laboratory"
		conversation
			`Dawn is just finishing her meal when you enter the spaceport cafeteria. She stands up as you approach and deposits the tray in a receptacle next to her table. "Well, ready to go?"`
			choice
				`	"Yes."`
					goto astralonwards
				`	"I should double check everything."`
					defer
			`	She nods. "I am ready, so I will come with you and wait onboard the <ship> while you do your checks."`
			label astralonwards
			`	She gestures towards the exit closest to your ship and heads off at a quick pace. Outside, she moves calmly through the hustle and bustle of the starport, stepping around quick-moving freight movers and camel wagons alike. Arriving at the <ship>, she turns and waits for you to catch up.`
			`	Just as you arrive and reach for the console to open the airlock, you sense a change in your surroundings. Looking around, you see that a group of Remnant gathered around the two of you, focused on Dawn. A young Remnant - scarcely more than a child - steps forward. "Thank you for your patience," he says, then steps back. An elderly Remnant steps forward. "Thank you for your curiosity," she says, then steps back. A middle-aged Remnant steps forward. "Go with our blessing, Seeker, and know that wherever you go, the Remnant go with you." She says it simply, but you feel the weight of tradition behind them. She turns to you. "And you, stranger who walks the stars... May the Embers guide your steps as you walk among us." She nods respectfully, then steps back.`
			`	As soon as the third steps back there is a flurry of movement as each of the Remnant present quickly step forward, give her a quick hug, and then scurry off into the starport. Before you process what is going on, all the Remnant gathered around you have vanished. You look at Dawn, and her expression is a mixture of awe and humility.`
			choice
				`	"They know you are coming back, right?"`
				`	"What was that about?"`
				`	"Alright, let's get going."`
					goto astralmoving
			`	"Well, what we are doing is dangerous. We will be crossing Korath territory, a wide expanse of uninhabited space, and then scanning a black hole. I have confidence that we will return, but nonetheless there is still a chance that we will die in the process.`
			`	"Long ago we, as a people, decided that we must face the fear of separation, unknown, and danger. One of the ways we do that is by holding these informal ceremonies. When one of us is going to depart on their first long-distance voyage into hostile territory, a group of Remnant gather to bid them farewell. It is a way to strengthen ourselves and remind each other of our connections."`
			choice
				`	"Thanks for the explanation."`
					goto astralmoving
				`	"Kind of like a funeral, with friends and family gathering to see you off?"`
			`	"Oh, no. I said my farewells to my friends and relatives before we left. Those who gathered to see me off today were more of a representation of Remnant society. I only recognized a few of them, but they took the time to come down to the <ship> to meet me before I left. They came to see me and wish me well, so that no matter what challenges I face, I will know that the Remnant remember me and appreciate what I am doing." Her gestures fade into contemplative stillness for a moment, then resume motion.`
			label astralmoving
			`	She gestures towards the airlock door. "Lead the way, Captain."`
				accept
	on enter "Sagittarius A*"
		conversation
			`As the jump drive's energy ripples fade away, the spectacular void that is Sagittarius A* takes shape before you. Compared to the vast darkness of space that you are accustomed to, reality here feels almost like a color negative: even with the automatic filtering in your windows, space is incredibly bright with the densely packed stars that provide a backdrop for its inky mass. The moment of awe is shattered by alarms warning of your impending doom as the <ship> begins to fall inwards towards the black hole. You quickly activate your repulsor engines, which, although vastly under-powered for dealing with the immense pull of a black hole, does provide a degree of protection so long as you maintain a safe distance from it.`
			`	After a few minutes of just absorbing the spectacle before you, Dawn pulls herself away from the cockpit windows and scurries down to the lab. Leaving you to your thoughts, she quickly has the lab set up and running a variety of recordings, tests, and observations. After a few hours of work, she reappears on the bridge.`
			`	"Things are proceeding smoothly, Captain. All the sensors are working nominally, and we are creating extensive archives of astronomical data as well. Another few hours, and we should have all the data we need."`
			choice
				`	"Good work. What kind of data are you recording?"`
				`	"Sounds good. Just let me know when you are ready to leave."`
					goto astraldone
			`	She smiles, and replies. "It might be easier to ask what we are leaving out. The data we are collecting broadly falls into three sets: data on Sagittarius A* itself, data on its environment, and observations of the surrounding galaxy from here. Obviously, we cannot go take samples of Sagittarius A* itself, nor can we take direct measurements of most of its properties, but we can get data from increasingly minute distances from the event horizon. We can then add this data to that gathered by previous expeditions, note the differences, and use it in our modeling."`
			choice
				`	"So this is not the first expedition here?"`
				`	"Anything unusual in the data?"`
					goto astraldata
				`	"How much longer does the equipment need?"`
					goto astralfinish
			`	"No, this is the forty-third such expedition. Sagittarius A* was one of the first places our explorers sought to visit after we acquired jump drives, and we have been coming back regularly ever since. I know some of our reconnaissance pilots consider visiting here a pilgrimage of sorts. It is humbling to be here myself after reviewing so many data sets of past expeditions." She looks thoughtful, staring out the window at the hub of the galaxy, as if her thoughts are jumping from idea to idea.`
			choice
				`	"Anything unusual in the data?"`
				`	"How much longer does the equipment need?"`
					goto astralfinish
			label astraldata
			`	"There are many oddities about this place. Every visit helps revise our physics models a little closer. But they also reveal problems." She frowns, her gestures taking on a curious tone. "For instance, you will note that your ramscoops are not picking up anything. According to standard astronomical theory, this system should be a veritable river of suitable material, and yet there is nothing. Not even the normal background trace amounts we find in deep space. We have visited other black holes, and they conform to the standard models in this respect. But not Sagittarius A*." She pauses, thinking about it for a moment.`
			choice
				`	"Is the equipment finished?"`
				`	"How much longer does the equipment need?"`
			label astralfinish
			`	"The equipment will be finished shortly, Captain <first>. I just need to make a few observations, and then we will be able to depart. In the meantime, I would recommend against maintaining an active cloak or engaging any systems that consume fuel. For whatever reason, Sagittarius A* continues to be the one place that the stellar wind is utterly devoid of anything to collect as fuel."`
			`	"I will be going outside for a few minutes," Dawn declares. "I shall just be on the hull."`
			choice
				`	"Let me know when you are done."`
					goto astraldone
				`	"Would you mind if I came too?"`
			`	"Not at all, Captain. The view should be remarkable, and so long as we stay inside the shields, the radiation will not pose a problem." You quickly don your spacesuit and join Dawn outside on the hull. As promised, the view is indeed magnificent. Dawn signs occasionally, pointing out various features, and you appreciate that out here, sound would just be incongruous with the natural splendor.`
			scene "scene/sagittarius a"
			label astraldone
			`	After what feels like hours, the equipment notifies you that it has finished taking its readings, and Dawn packs up the data in carefully shielded data crystals. Everything is ready to return to <destination>.`
	on complete
		payment 500000
		conversation
			`The journey back to <planet> was a lesson in galactic formation as the <ship> jumped through a steady stream of systems. Gradually, the brilliant density of stars that make up the inner core faded into the ominous and yet comfortingly familiar red glow of the Ember Waste. Finally, you slide into the approach patterns of <planet>, quickly tapping out your code into the IFF system and watching as the protective gaze of the anti-air emplacements sweep the skies around you for shadowing craft.`
			`You settle onto your assigned pad, and within seconds Remnant technicians have resupply cables hooked up while a cheerful group greets Dawn before helping her unload her luggage and data crystals. "Well, <first>, it has been a good trip." She taps at her commlink. "I have transferred our expedition's logistics allotment of <payment> to you. And in case you're wondering what to do with your Research Laboratory, you can keep it. We always need fresh data, and if you are interested, you can check up on places designated in the job board. While I handled the science on this expedition, if you keep it installed your ship systems will automatically hire a scientist to run it." She nods her head in respect to you. "Thank you, and may the Embers watch over you." She turns and heads off into the flows of people.`



outfit "_Ion Storm Timer: Generator"
	# This generator will fail when an ion storm comes and the ship runs out of energy
	"hull repair rate" 60000
	"hull energy" 1



ship "_Ion Timer Ship"
	# The Timer Weapon causes this ship to continually lose hull points
	# The _Ion Storm Timer: Generator outfit counteracts this until there is an ion storm
	# sprite "ship/shuttle" # uncomment this for debugging
	attributes
		"heat dissipation" 1
		"hull" 1.0
		"mass" 100
		"drag" 5
		"automaton" 1
		"energy generation" 1
		"thrust" 10
		"turn" 600
	outfits
		"Timer Weapon"
		"_Ion Storm Timer: Generator"
	gun 0 0



mission "Remnant: Expanded Horizons Storms 1"
	name "Ember Waste Storm Scanning"
	description "Dawn has asked that you scan one of the Ember Waste's storms at <waypoints> and return with the data to <planet>."
	passengers 1
	source
		government "Remnant"
	waypoint
		system "Aescolanus"
	to offer
		has "Remnant: Expanded Horizons Astral 2: done"
		random < 30
	on offer
		require "Research Laboratory"
		conversation
			`As you cross the starport, you are suddenly ambushed by Dawn appearing out of a side hallway. "Captain <first>! I have been hoping to catch you. I need some help." She hurries up, waving a datapad full of charts. "I have some additional leads for my research project, and I need a pilot who can take me out to Aescolanus." She looks at you hopefully.`
			choice
				`	"Sure, I am always willing to help."`
				`	"Not today, sorry."`
					decline
			`	"Excellent! You already have a Research Laboratory onboard, and it has all the equipment I need. Now, before we head out, you should know that the goal of this mission is to do some analysis on the leading edge of a storm that will be breaking on the system shortly. We do not need to weather the entire storm, but we will have to be there for at least the first part."`
			choice
				`	"Are there any special adjustments needed?"`
				`	"The <ship> is ready to go."`
					goto readyforstorms
			`	"Well, I expect you are already set up to handle the normal Ember Waste heat, correct?" She continues without waiting for you to reply. "The Ember Waste storms are primarily a danger to electrical systems - typically by draining your power. So you can compensate by ensuring that you have some excess available for use. I know some captains carry extra generators to ensure they always have extra power, but others instead carry extra Crystal Capacitors so they can outlast the storm. In theory, you could just accept that your ship will be shut down during the height of the storm, and simply reboot everything afterwards. So long as no threats are present, it is safe but somewhat nerve-wracking. Which strategy fits the <ship> is up to you."`
			label readyforstorms
			`	"I will settle into a bunk to do some pre-calculations. Please let me know when we arrive in Aescolanus."`
				accept
	on waypoint
		dialog `Dawn quickly sets to work expanding the laboratory and setting up her instruments. After a few minutes, she returns to the cockpit and settles into a chair by the window. "Everything is ready, Captain. Now we just wait for the storm to arrive. I will let you know when we are ready to leave."`
	npc kill
		government "Test Dummy"
		system "Aescolanus"
		ship "_Ion Timer Ship" "Timer"
		personality unconstrained heroic nemesis
		dialog `As the storm starts to swell around you, the instrumentation chimes to indicate that it has collected all the data it needs. Dawn quickly begins the shutdown routine to protect the equipment against potential damage, giving you the OK to return back to <planet>.`
	on complete
		payment 250000
		conversation
			`"Thank you for your help, <first>. Sometimes I have to wait a while before we have a ship available to do missions like these." She pauses, then taps her commlink. "Speaking of which, I have confirmed the transfer of the logistics fee of <payment> to your account."`
			choice
				`	"I am always happy to help. What are you working on now, anyway?"`
				`	"I am always happy to help. See you around!"`
					goto stormend
			`	"How familiar are you with the nature of space?"`
			choice
				`	"Not very, to be honest."`
				`	"I know space is a vacuum, and can be either extremely hot or extremely cold depending on circumstances..."`
					goto basics
			`	She nods "Honesty is good. It is hard to learn when we are not willing to admit that we do not know something."`
				goto explanation
			label basics
			`	She nods "Those are the basics, a good starting point."`
			label explanation
			`	A hologram of the Ember Waste appears over her commlink. "As you have no doubt picked up on, the Ember Waste does not conform to humanity's commonly understood rules about space. For instance, the standard background temperature is 2.B1 degrees, and the average density of the interstellar medium is F4240 particles per cubic meter. Here in the Ember Waste, the average background temperature is an order of magnitude greater and has an average density of E8D4A51000 particles per cubic meter."`
			`	The display changes as an overlay of haze appears, pulsing in intensity. "Most interestingly, though, is that this area is significantly more variable than the rest of the galaxy. The haze shown here represents the heat hazard schematic we produce for our captains. It combines the local density with the measured heat values to estimate how much heat ships will be exposed to in the area."`
			choice
				`	"Interesting! Is that what causes the red glow?"`
				`	"Wait a second. Why are there letters in your numbers?"`
					goto numericsystem
				`	"Thanks! I think that is all the details I can handle right now."`
					goto stormend
			label stormresume
			`	"Not really, although it does contribute to it. Most of the red glow seems to be the result of clouds of hydrogen gases at approximately 2710 degrees, rather like the process documented by early Earth astronomers investigating nebulae. Except for most of these clouds, there is no obvious source of energy to keep the hydrogen excited. Obviously there is still energy being added to the system, but..." She trails off and gestures deprecatingly. "One more mystery to keep us alert and attentive."`
			`	She smiles thoughtfully, and the display changes with the red haze vanishing and a silvery haze replacing it. "But that is where today's research comes in. We have been measuring these storms since we arrived in the Ember Waste. The human eye can only pick out a few of them on the display, but our algorithms have identified a significant number of ripples of energy." She appears thoughtful.`
			`	"It is almost like watching the surface of a pond during a rainstorm: The surface appears to be chaotic, but with detailed enough instrumentation, one can pick out individual ripples and trace their paths backwards... Except we have yet to find an actual source for any of them. We can trace every ripple on a pond in a storm and find its origin, but we have yet to learn the dance that we have lived in for half a millennia."`
			choice
				`	"What do the storms have to do with the heat?"`
				`	"What units do you use for temperature?"`
					goto tempunits
				`	"I think that is all the technical detail I can take."`
					goto stormend
			`	She looks mischievous. "I cannot tell you where or how we got it, but look at this." Her display shifts again with the hazes vanishing, and shows the galaxy map with one key difference. "Yes, the Ember Wastes are violet. Actually, they are off the visual spectrum into the ultraviolets, but this downshifts it so we can see it. This is what the Ember Wastes looked like a very long time ago."`
			`	She takes on a serious tone. "This data suggests there is enough energy in the area to maintain the hydrogen at somewhere in excess of 61A8 degrees. It does not tell us the source of that energy, but based on patterns and some other data we have collected, the two appear to be intertwined. At the very least, the ion storms are one of the means by which energy is being transferred into the clouds." Her display vanishes, and she slings her backpack over her shoulder.`
				goto stormend
			label numericsystem
			`	She looks confused for a moment before responding. "It is called hexadecimal. It is a base 16 numeric system." She pauses to look at you. "Based on your reaction, I assume that base 10 is still the standard in human space?"`
			choice
				`	"Yes."`
					goto stormcontinue
				`	"How does that work?"`
			`	"Quite simply: We have added some extra characters. When counting, instead of a single digit position restarting at 0 every 10, they cycle every 16. So when we count, we start at 1, but when we reach 9, the next number will be A. Then B, C, D, E and F. Then, it is at that point that we add an extra digit and restart at 0 with 10. So in hexadecimal F would be equal to 15 in base 10. One of the advantages of using a numeric system with a higher base is that we can handle larger numbers with fewer digits. For example, with two digits we can communicate any integer up to what would be 255 in base 10. Or with three digits we can reach 4095. Saving an extra digit here or there is fairly meaningless in written formats, nor is it much of a difference in oral communication. However, when one communicates by gestures, it is helpful to shorten the numbers where we can."`
			label stormcontinue
			`	"Now that you understand our numbers a bit better, you will be able to recognize that there is a lot of unexplained energy being transferred out there."`
			choice
				`	"Right. Is that what causes the red glow?"`
					goto stormresume
				`	"Thanks! I think that is all the details I can handle right now."`
					goto stormend
			
			label tempunits
			`	She looks at you curiously. "Corrected degrees Kelvin, of course. Why?"`
			choice
				`	"What are 'Corrected degrees Kelvin'?"`
				`	"Just clarifying. I prefer to use degrees Centigrade."`
					goto centigrade
				`	"Just clarifying. I prefer to use degrees Fahrenheit."`
					goto fahrenheit
			`	"Corrected degrees Kelvin are basically the standard Kelvin scale developed millennia ago, but with a slight correction factor to account for the adjustments determined by the conjunction of 2730. It is a rather minuscule change to the scale that is mostly only applicable to experiments or industrial applications that require micro-degree temperature precision, but can be significant at the larger scales." The display and its field of stars vanishes as she slings her backpack over her shoulder.`
				goto stormend
			label centigrade
			`	"People still use that? We learned about it in our studies, mostly in case we came across references to it our library. I have seen it a few times, but it is rarely used among us." The display and its field of stars vanishes as she slings her backpack over her shoulder.`
				goto stormend
			label fahrenheit
			`	She looks at you quizzically for a moment, and then her display shifts to a mass of symbols. She skims briefly. "I have never even heard of such a unit. Apparently it is a very old one, though. Our records say that it had largely stopped being used by early in the 21st century. Well, I learned something new today." The display and its field of symbols vanishes as she slings her backpack over her shoulder.`
			label stormend
			`	"Thanks for the ride, Captain. I have to get working on this data, but if you are interested in helping some more, I hope to have more research expeditions planned soon."`



mission "Remnant: Logistics 1"
	name "Rush delivery to <planet>"
	description `Deliver <cargo> to <destination> by <date>.`
	source "Caelian"
	destination "Viminal"
	cargo "Generator (Furnace Class)" 39
	deadline 2
	to offer
		has "remnant: blood test pure"
		has "Remnant: Defense 1: done"
	on offer
		conversation
			`You step out of the <ship> amidst the strange sight of the <origin> spaceport. The structures that surround the landing pads look as much grown as built, and they seem to merge into the landing pads themselves. As usual, the dock entrance is busy. When your commlink vibrates, you have to find a place where the traffic eddies so you can step aside. When you do, you learn you need to check in with the information desk.`
			`	The woman working the desk seems startled to see you when you walk up. You can see the realization dawn on her as she looks you over with a practiced eye. "Ah," she sings, "you are the ancestral sojourner among us."`
			`	It is typical for people to gawk at you, so you respond by singing, "The Embers guided me to friends I didn't know, and your message invited me to meet a new one."`
			`	Her hands make a short series of shakes and a moment later she remembers to laugh for you. The delayed response makes her laugh again, spontaneously this time, and you both join in. When she recovers herself, she sings, "Logistics have requested that we find someone who can carry <tons> of cargo to <planet>. Is the <ship> available immediately?"`
			choice
				`	"Certainly!"`
					goto willdo
				`	"Sorry, it is not."`
					goto notinterested
			label willdo
			`	"Excellent," she responds in a full alto, "I will let the project manager know the cargo will arrive promptly." She signs what you think is a farewell and turns to address someone else who has stepped up.`
			`	You manage to chant and point your way through the cafeteria line, and you are aware of the flurry of signs around you. There doesn't seem to be a way to pay, so you find a table and sit alone until your commlink chimes to let you know that the <ship> has been refueled and the mystery cargo loaded.`
				accept
			label notinterested
			`	"That is unfortunate," she sings as she makes a notation on her terminal. "But there will be others who are willing to help."`
				decline
	on complete
		payment
		conversation
			`You step off the <ship> on <planet> to see a man wandering around your ship taking video with a datapad and softly dictating some running commentary. He dodges around the dock workers unloading and refueling, seemingly intent on recording every aspect of your ship.`
			`	"Cousin!" he sings with excitement when you walk up to him. "It is good to meet you and to see your wonderful ship. It excites me to be able to examine something I have only seen in entertainments based on our scouting reports." He holds up the datapad facing you and says, "I am making a video for my companion. He will not believe me unless I have proof, and maybe not even then!" he laughs. You wave at the camera and he stops recording.`
			`	"I hope I have not offended you. I get carried away looking at ships." He runs his hand along the landing strut but then seems to collect himself and turn back to you. "I am named Eon," he says. "Would you have time to talk about logistics support?"`
			choice
				`	"Yes, I've been looking for more work with the Remnant."`
				`	"Yes, there haven't been many opportunities so far."`
			`Eon leads you to the bustling cafeteria, chattering about ship design since the Alpha Wars. He orders a couple of hot drinks and leads you to a quiet table overlooking the docks. You try your drink. It's strongly flavored but a bit odd, like someone's memory of what coffee should taste like, reconstituted from local foods.`
			`	Eon leaves his untouched as he launches into conversation. "Those of us in logistics have noticed that you are spending time in our systems, and we wanted to see if you would be available to pick up work for us. It would be delivery work like the generator you brought for the housing project."`
			choice
				`	(Nod)`
					goto delivery
				`	"You put starship radiothermals in your houses?"`
			`	"You do not?" he responds playfully. "Well, 'generators in each community' would be more accurate. We maintain a decentralized power grid so we have more resiliency in the event of an attack or natural disaster. It also makes use of the power plants we salvage from the Korath and ones we recover from our own damaged ships. Besides, widely deploying the technology ensures that we have expertise to maintain and repair it all across the Remnant. But," he signs a pushing motion, "civil engineering is another subject. I hope you are more interested in how we move our various cargoes."`
				goto delivery
			label delivery
			`	"That generator was originally scheduled for delivery 30 days from now, but it was ready earlier and the project can install it now. So, by bringing it over, you have enabled us to move the project forward and free up delivery capacity next month."`
			`	"So, why did you offer this work to me?" you ask, trying to mimic the gestures you've seen that you think refer to one's self.`
			`	He smiles and responds, "Very good! Very good! We schedule everything, but we maintain slack in the system to take advantage of opportunities like the power system being ready early, or to deal with emergencies. Sometimes, of course, we have to drop everything and sort the schedule out later. But, in normal times, we publish these jobs on the job board and captains that have capacity available can pick them up. The projects provide resource allocations to cover operating and crew costs, but there is no... what is the word? Margin, yes! Since your ship is not in our planned resources, you provide extra capacity, and we might be able to move some of our larger projects forward when you are in our space."`
			choice
				`	"Thanks for the opportunity."`
					goto thanks
				`	"Will your pilots be upset at the competition?"`
			`	Eon smiles at the question. "You should talk to the other pilots and see, but I think the ancestral approach is different. We work more like a military: the ships are owned by the Remnant, but each captain is responsible for the ship, the crew, and the transport work that needs to be done. I think they will be happy to see new homes being built, and freeing up more time for them and their crews to spend within the community."`
				goto thanks
			label thanks
			`	Before you can ask more about transport jobs, Eon takes out his commlink and taps on it for a few minutes. "You now have access to the logistics job board. You should be able to see our current job list for each system when you check."`
			`	You continue to chat with Eon as you sip your drink. When you finish, his commlink chirps. As he stands, he signs what you think means "goodbye" as he says he has to leave for another meeting. He walks off quickly with his head down looking at the datapad. Your commlink notifies you that <payment> have been added to your account.`
